Re: How to duplicate or alias a file in Finder?
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