• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Copying from one list of files to another
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copying from one list of files to another


  • Subject: Re: Copying from one list of files to another
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 18 Sep 2002 18:09:44 -0700

You haven't worded the problem clearly enough for me to give you detailed help. However, here's some things that need clarifying.

by "first six characters of their names," does "their" refer to the names of the files in list1 or the list of the folders in list2? It appears that list2 is a list of folders, and list 1 is a list of files.

where do you define MyVar?

in "copy item i from List1 to folder i in List2 whose name begins with MyVar" what are you trying to use "whose" for? You've already identified item i of list1, and there is no such thing as "folder i" of list2; lists have items.

Also "copy item i from list1" needs to be "copy item i of list1"

the construct "folder i in list2" is wrong; it would have to be "folder i of list2"; however, you can't use folder in that construct, as I wrote above--you have to use "item"

"end repear" should be "end repeat"; it won't compile as written because of that.

I'm sure that there is more, but they won't show up until the above is fixed.

On Wednesday, September 18, 2002, at 04:55 AM, Chad Chelius wrote:

I am writing a script where I have two lists of files and want to be able to
copy the actual files in one list to a folder in another list based on the
first six characters of their names. I would envision the script looking
something like this:

tell application "Finder"
repeat with i in List1
copy item i from List1 to folder i in List2 whose name begins with MyVar
end repear
end tell

We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Copying from one list of files to another (From: Chad Chelius <email@hidden>)

  • Prev by Date: Re: In defense of 'English-like' AS (was Re: Search a file question - Mac OS 9)
  • Next by Date: Re: Folder Actions
  • Previous by thread: Copying from one list of files to another
  • Next by thread: FMP 6.0v3, OS X 10.2 and AppleScript -> Broken
  • Index(es):
    • Date
    • Thread