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 |
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!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, that is probably a bug. I think I gisted this in a hurry to show someone in IRC or something. I don't use directory watch anymore, I just use curl and my torrent client equivalent like this: https://gist.github.com/g-r-a-v-e-l-y/35a91ca9948700b00b6a043cfcbaeb3d