Re: Duplicate item with new name to same folder?
Re: Duplicate item with new name to same folder?
- Subject: Re: Duplicate item with new name to same folder?
- From: Peter Waibel <email@hidden>
- Date: Thu, 11 May 2006 17:42:07 +0200
Try something like this:
tell application "Finder"
set sourceFile to (choose file)
set targetFile to duplicate sourceFile
-- set targetFile to duplicate sourceFile to folder "my:folder:path:"
-- use "to" only if you want to copy the file to another folder
-- the argument for "to" is a folder, not a file!
set name of targetFile to "MyNewName"
end tell
Peter
Am 11.05.2006 um 13:16 schrieb Ruth Bygrave:
This _must_ be obvious, but I'm scratching my head about it.
set docpath to (path to documents folder as string)
tell application "Finder" to duplicate file XMLFile to file docpath
& "NewFile.xml"
That doesn't seem to work. I looked it up, and the book says it
wants a folder or disc name as where to copy to.
Right, so I tried
tell application "Finder" to duplicate file XMLFile to docpath with
properties {name: "NewFile.xml"
That doesn't even compile. Help! What obvious thing am I missing?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40opix.de
This email sent to email@hidden
Grüße aus Berlin _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden