Re: Copying a file and changing its name
Re: Copying a file and changing its name
- Subject: Re: Copying a file and changing its name
- From: David Blache <email@hidden>
- Date: Mon, 29 Jan 2001 17:03:12 -0600
on 1/29/2001 4:04 PM, Drew Fiero (email@hidden) wrote:
>
Hello,
>
>
I know this is so easy but I can't seem to get the syntax right. I
>
want to copy our retrospect catalog file to another drive with a
>
different name.
>
>
What I've been trying are variations like this:
>
>
tell application "Finder"
>
duplicate file,
>
"HD1:Folder:Backup" to alias "HD2:Folder:Backup_todaysDate"
>
end tell
>
>
This only seems to work if the file already exists.
>
>
How do get the copy to go to a file with a different name?
Why not just:
tell application "Finder"
set dup to duplicate file "HD1:Folder:Backup"
set name of dup to "Backup_todaysDate"
end tell
-David
--
___________________________________________________________________
David Blache email@hidden
Metrowerks Corporation
http://www.metrowerks.com