Folder Actions Help

Discussion in 'Mac Programming' started by sktyrhrtout, Sep 23, 2007.

  1. sktyrhrtout macrumors newbie

    Sep 23, 2007
    Here goes: I have just started looking at Apple Scripts and am very new at this so here's what I'm trying to accomplish. I want to use the Add New Item Alert but modify it a lot. When I download a file using acquisition it automatically puts a copy into the itunes music folder, and deletes the original. I want to have it also copy it to a network folder. So can I have apple script connect to a network and copy the file to the shared folder. I just want to have my two computers at home to have the same music library, because i download using my macbook pro and I have a zune so i want the music i download to be synced. okay that's it. thanks guys for any help
  2. angelwatt Moderator emeritus


    Aug 16, 2005
    You could use a terminal command called rsync, which works great for syncing folders (like your music folders). The command could be put into an applescript for easier running, and then you could run it every so often, or find a way to automate that part a little bit, like running so often.
  3. sktyrhrtout thread starter macrumors newbie

    Sep 23, 2007
    okay so how would i work that into the alert script. would that include connecting to the network when it launched?
  4. sktyrhrtout thread starter macrumors newbie

    Sep 23, 2007
    okay so here's the route i went. Remember this is my first script so I'm pretty stoked about it even though it might suck. The question i have is this: The folder I want to use it on is Itunes Music, but when acquisition adds music to that folder it just puts it into the artist folder if it already exists. How do include all the folders inside of the Itunes Music folder. Thanks Guys.

    on adding folder items to this_folder after receiving added_items
    tell application "Finder"
    mount volume "smb://"

    end try

    duplicate (added_items) to folder "zunemusic" of folder "my music" of disk "shareddocs"

    eject disk "shareddocs"

    end try
    end tell
    end adding folder items to

Share This Page