• 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 copy a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >how to copy a file (From: Graham Anderson <email@hidden>)

  • Prev by Date: Re: PDF Form Reading
  • Next by Date: Re: My choose URL problem
  • Previous by thread: how to copy a file
  • Next by thread: Re: how to copy a file
  • Index(es):
    • Date
    • Thread