Automator to download from dropbox to external hdd

Discussion in 'Mac Programming' started by beholder121, May 5, 2012.

  1. beholder121 macrumors newbie

    May 5, 2012
    Hello guys,

    I looked around this forum and learned how to use automator to move files from one folder to another, but I have a few issues:

    1. I want to move pictures uploaded to dropbox "uploaded from camera" to folder on my external HDD, but the "uploaded from camera" folder needs to stay there, just empty from all the files.

    How do I tell automator to movie the folder's content but leave the folder itself alone?

    2. I want this action to take place automatically everytime I connect my external HDD (WD passport). Can I just tie the action to the folder (under services) because it doesn't seem to work?

    My goal is to download all the content of the "uploaded from camera" folder in dropbox into a folder in my external HDD and have all the content in the original folder deleted.
  2. kryten2, May 5, 2012
    Last edited: May 6, 2012

    kryten2 macrumors 6502a

    Mar 17, 2012
    The Get Folder Contents action will get the folder's content, just like it says in the description. -->This action gets the items from inside the specified folders.

    Maybe possible with a stay open script or through launchd. Disadvantages for the script is like the name says it has to stay open an can become a resource hog. If the name of your external disk is BACKUP something like this could work. Note: code is untested so it may fail as I don't have or use dropbox.

    set the_source to "path:to:dropboxfolder:"
    set the_dest to "path:to:destination"
    tell application "Finder"
    	repeat until disk "BACKUP" exists
    	end repeat
    		move entire contents of folder the_source to the_dest
    	on error the error_message number the error_number
    		display dialog "Finder encounterd an error while trying to move the files." & return & "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
    	end try
    end tell

Share This Page