AppleScript question

Discussion in 'Mac Programming' started by ScrewzLuse, Jul 13, 2006.

  1. macrumors member

    Joined:
    Jul 9, 2006
    #1
    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
     
  2. macrumors member

    Joined:
    Dec 27, 2005
    #2
    How did you do it in windows
    (sorry I cant help you with the apple script problem :( )
     
  3. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #3
    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.
     

Share This Page