Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nikolaiwarner/2653317 to your computer and use it in GitHub Desktop.
Save nikolaiwarner/2653317 to your computer and use it in GitHub Desktop.
OSX Folder Action Applescript to toss new files into Dropbox
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
@nikolaiwarner
Copy link
Author

lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment