Re: copy files
Re: copy files
- Subject: Re: copy files
- From: Joe <email@hidden>
- Date: Tue, 3 Jun 2008 22:14:09 -0700
David G. Kahn wrote:
Could anyone help me with trying to copy different files from one
folder to different locations.
Ex) File 1, File 2, File 3. Copy File 1 to Applications, copy
file 2 to Desktop, copy file 3 to /tmp
Mark J. Reed wrote:
The general syntax is
tell application "Finder"
copy file (file to copy) to folder (folder to copy into)
end tell
The actual form of the parenthesized parts depends mostly on how your
script learns what it's supposed to copy and where.
Has this action always used "copy" as the command? I dimly recollect
needing to use "duplicate" rather than "copy" some eons ago.
This works fine:
tell app "Finder"
copy file "HD:Folder A:File A" to folder "HD:Folder B:"
end tell
This fails:
tell app "Finder"
copy file "HD:Folder A:File A" to alias "HD:Folder B:"
end tell
--->Can’t make «class docf» "File A" of «class cfol» of «class sdsk»
of application "Finder" into the expected type.
While this works with 'mixed' reference types:
tell app "Finder"
duplicate file "HD:Folder A:File A" to alias "HD:Folder B:"
end tell
--
Joe _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden