• 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: How to duplicate or alias a file in Finder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to duplicate or alias a file in Finder?


  • Subject: Re: How to duplicate or alias a file in Finder?
  • From: wayne melrose <email@hidden>
  • Date: Fri, 18 Mar 2005 21:28:06 +0100

rather than using the Finder, why not try a shell command.. "Ditto" is really helpful at copying files and replacing them especially when you want to rename a file along the way..


set sourceFolder to "Mac-OS-X:Users:dennisj:Documents:Cathy:Data -
Rawx:" as string
set theFile to "050315-CATHY-H05058.txt" as string
set sourceFile to (sourceFolder & theFile) as string
set importFile to "Mac-OS-X:Users:dennisj:Documents:Cathy:Data -
Importx:import.txt" as alias

do shell script "ditto " & (POSIX path of sourceFile) & " " & (POSIX path of importFile)




On Mar 18, 2005, at 9:19 PM, Dennis Jones wrote:

I need to duplicate a file or make an alias of a file from one foldler
to a fixed name file/alias in another folder. what is the proper
syntax?

Here is the code I have so far:

set sourceFolder to "Mac-OS-X:Users:dennisj:Documents:Cathy:Data -
Rawx:" as string
set theFile to "050315-CATHY-H05058.txt" as string
set sourceFile to (sourceFolder & theFile) as alias
set importFile to "Mac-OS-X:Users:dennisj:Documents:Cathy:Data -
Importx:import.txt" as alias

tell application "Finder"
-- duplicate sourceFile to importFile with replacing -- doesn't work
-- or --
-- make FinderAlias of sourceFile as importFile -- not even close
end tell


--
Dennis Jones
email@hidden
_______________________________________________
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
 _______________________________________________
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

References: 
 >How to duplicate or alias a file in Finder? (From: Dennis Jones <email@hidden>)

  • Prev by Date: Are there any other Applescript coders in Tampa?
  • Next by Date: Flagged msg´s in inbox in Mail...
  • Previous by thread: How to duplicate or alias a file in Finder?
  • Next by thread: Re: How to duplicate or alias a file in Finder?
  • Index(es):
    • Date
    • Thread