Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ScrewzLuse

macrumors member
Original poster
Jul 9, 2006
40
0
Not sure exactly where this would be better posted but a mod can move it if they think it should go elsewhere. I'm new to AppleScript and am trying to do something I did on Windows. I'd like to be able to copy a directory (in this case on a thumb drive called THUMB DRIVE in /SAP/PortableThunderbird/Profiles/Mail to /Documents/Mail on the startup drive) when the thumb drive is connected. Because I use Thunderbird where I go for my job and such, I like to be able to keep all the inboxes and such synced. Any help would be greatly appreciated. :D
 

stunna

macrumors member
Dec 27, 2005
83
0
How did you do it in windows
(sorry I cant help you with the apple script problem :( )
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
Code:
do shell script("cp /SAP/PortableThunderbird/Profiles/Mail/* /Documents/Mail")
should do it, I'm assuming that you have a documents folder on the root of your drive (not the one in your home folder) if it's in your home folder it is

Code:
do shell script("cp /SAP/PortableThunderbird/Profiles/Mail/* ~/Documents/Mail")
both the above assume the Mail folder exists in the documents folder.

If the folder is in the thumb drive you need to add /Volumes/THUMB\ DRIVE (the backslash is to cancel out the space) to the beginning of the /SAP/Portable... bit.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.