Last active
November 4, 2022 18:56
-
-
Save g-r-a-v-e-l-y/1362655 to your computer and use it in GitHub Desktop.
An applescript folder action that moves downloaded torrent files to a different directory.
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 thisFolder after receiving added_items | |
mount volume "afp://user@host/share" | |
delay 1 | |
repeat with addedFile in added_items | |
tell application "Finder" | |
if (the name of the addedFile ends with "torrent" or "nzb") then | |
display notification "Queueing " & (name of addedFile) & "." | |
try | |
tell application "Finder" | |
move addedFile to "spool" with replacing | |
delete addedFile | |
end tell | |
on error | |
display alert "Unable to move " & (name of i) | |
end try | |
end if | |
end tell | |
end repeat | |
end adding folder items to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh cool. Thanks for sharing that! I’m going to dig in on that later. I’m still learning scripting, but have managed to make some pretty cool automations. Thanks for sharing this!