• 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
Backup script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Backup script


  • Subject: Backup script
  • From: Jules Kassmann <email@hidden>
  • Date: Thu, 17 Feb 2011 13:44:53 +0000

Hello,

I just wrote a script to backup my external HDD, which was destroying data. Some films I had on it couldn't be read or written. I couldn't select all and paste on my desktop because if only one file is broken, the whole copy/paste process is stopped.
Here is my script:



tell application "Finder"
    activate
   
    set theFolder to choose folder with prompt "Choose folders to backup" with multiple selections allowed
    set theItems to items of theFolder
    set destinationFolder to choose folder with prompt "Choose destination folder for the backup"
   
   
    repeat with aFile in theItems
        try
            with timeout of 5 seconds
                duplicate aFile to destinationFolder
            end timeout
        on error errorMsg
            log "the error message " & errorMsg
        end try
    end repeat
   
   
end tell



I changed it a bit so it can be used for any backup, when the files are not all clean. It is working, but the only feature missing is a list of the files that weren't backed up. Does anyone knows how I can do this? And if my script has to be improved?



Regards,


Jules
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Backup script
      • From: Bert Groeneveld <email@hidden>
  • Prev by Date: Re: Best practices
  • Next by Date: Re: make new alias -- weird behavior
  • Previous by thread: Re: Finder can't count?
  • Next by thread: Re: Backup script
  • Index(es):
    • Date
    • Thread