AppleScript and External Harddrives

Nicolasdec

macrumors 65816
Original poster
Dec 7, 2006
1,168
0
São Paulo
i'd like to see if it is possible w/sample AppleScript to initiate a HD to USB HD file copy. e.g., as soon as the USB Harddrive drive is inserted and mounted, the AppleScript copies the entire Mac HD to the USB Harddrive.
 

kolax

macrumors G3
Mar 20, 2007
9,186
115
As in an automated backup kind of thing?

I can think of the algorithm but have never coded in Apple Script so couldn't help you there. Also, there might be a problem with permissions to run the program as soon as you connect the hard drive...? Could be diagnosed as a potential trojan?

Only way I can think of doing it is having to manually run the program when you connect your hard drive, or have the program running when you connect the hard drive.

Found this for you - the guy here is doing the opposite but the call methods can be reversed to do what you are after.

http://bbs.applescript.net/viewtopic.php?pid=80725
 

Nicolasdec

macrumors 65816
Original poster
Dec 7, 2006
1,168
0
São Paulo
As in an automated backup kind of thing?

I can think of the algorithm but have never coded in Apple Script so couldn't help you there. Also, there might be a problem with permissions to run the program as soon as you connect the hard drive...? Could be diagnosed as a potential trojan?

Only way I can think of doing it is having to manually run the program when you connect your hard drive, or have the program running when you connect the hard drive.

Found this for you - the guy here is doing the opposite but the call methods can be reversed to do what you are after.

http://bbs.applescript.net/viewtopic.php?pid=80725

Yes, all i need is when I run the Applescript it will copy my Macs HD to a Folder in my USB HD. It dosent even need to be as soon as a plug in the USB HD.