Created
May 10, 2012 14:22
-
-
Save nikolaiwarner/2653317 to your computer and use it in GitHub Desktop.
OSX Folder Action Applescript to toss new files into Dropbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on adding folder items to this_folder after receiving these_items | |
try | |
set dropbox_folder to (path to home folder as text) & "Dropbox:" | |
set move_this to false | |
repeat with i from 1 to number of items in these_items | |
set this_item to item i of these_items | |
display dialog "Stray file was found. Move to Dropbox?" buttons {"No", "Yes"} default button 2 | |
if the button returned of the result is "Yes" then | |
set move_this to true | |
else | |
set move_this to false | |
end if | |
if move_this is true then | |
tell application "Finder" | |
move this_item to dropbox_folder | |
end tell | |
end if | |
end repeat | |
end try | |
end adding folder items to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lol