Backup script
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