• 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: Peter Baxter <email@hidden>
  • Date: Tue, 17 Apr 2007 08:10:27 +1000

Hi AS people,

I have a script that backs-up my USB memory stick each time it is inserted into my computer.  It works as an attachment to the Volumes folder.  Unfortunately I have more than one memory stick as I have one for each company I work with.  I would like to change the script so that it can copy the data from several sticks to different folders on my backup hard drive.  When I define the script with a single property, it works, however, if I define more than one memory stick, The script can only find those that are connected and the script  fails.  I currently have multiple individual scripts for each stick, but I would prefer to have the script identify which stick has been inserted and back it up to the right folder.  Can you help me?

property backup_items : alias "USBKEYNAME:"
on adding folder items to this_folder after receiving added_items
my trigger_backup()
end adding folder items to

on trigger_backup()
tell application "Finder"
set destination_foldername to folder "Path to my backup folder"
duplicate every file in backup_items to destination_foldername with replacing
end tell
end trigger_backup

Peter Baxter
email@hidden

"Never ask a man what computer he uses. If it's a Mac, he'll tell  you. If it's not, why embarrass him?"  --Tom Clancy



 _______________________________________________
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: Neil Laubenthal <email@hidden>
  • Prev by Date: Re: Symbol typing
  • Next by Date: Re: AFP mount
  • Previous by thread: Re: Application Support
  • Next by thread: Re: Backup script
  • Index(es):
    • Date
    • Thread