• 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 a file and changing its name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Copying a file and changing its name (From: Drew Fiero <email@hidden>)

  • Prev by Date: Re: Log Command
  • Next by Date: Re: Smile
  • Previous by thread: Copying a file and changing its name
  • Next by thread: Re: Smile, Script Debugger, Scripter
  • Index(es):
    • Date
    • Thread