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

Re: Backup script


  • Subject: Re: Backup script
  • From: Neil Laubenthal <email@hidden>
  • Date: Mon, 16 Apr 2007 19:34:06 -0400

There's a preference pane named Do Something When (http:// www.versiontracker.com/dyn/moreinfo/macosx/23675) that . . . amazingly enough, does something when a disk is inserted.

So . . . as long as your various memory sticks have different names; then just write a script for each stick and use this pref pane to execute the right script when the right memory stick is inserted.



On Apr 16, 2007, at 18:10, Peter Baxter wrote:

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 (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
40laubenthal.net
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ 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: Peter Baxter <email@hidden>
References: 
 >Backup script (From: Peter Baxter <email@hidden>)

  • Prev by Date: Re: AFP mount
  • Next by Date: Re: applescript uninstaller delete itself & customizing applescript application bundle binary filename (CFBundleExecutable)
  • Previous by thread: Backup script
  • Next by thread: Re: Backup script
  • Index(es):
    • Date
    • Thread