Re: how to copy a file
Re: how to copy a file
- Subject: Re: how to copy a file
- From: Bill White <email@hidden>
- Date: Fri, 21 Jan 2005 13:46:07 -0500
On 1/21/05 12:54 PM, Graham Anderson <email@hidden> wrote:
> I want to copy a file [myPref.xml] from a folder downloaded to the user's
> desktop to the user's preference file.
Do you know the name of the folder it's in? For the sake of example, say
it's in a folder named "Folder" in the script that follows.
Give this a try:
set prefsFolder to path to preferences
set yourFile to (path to desktop as string) & "Folder:myPref.xml" as string
try
yourFile as alias -- make sure the file exists first
tell application "Finder" to move yourFile to prefsFolder
-- or use
--tell application "Finder" to move yourFile to prefsFolder with
replacing
-- to overwrite an existing myPref.xml in the prefs folder
end try
HTH,
Bill
_______________________________________________
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