Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --This script is Folder Action Script. It moves .torrent files to subfolder "Torrents" of the folder to which you attach this script.
  2. --You need paste the text below to AppleScript Editor, and then save it to \Library\Scripts\Folder Action Scripts.
  3.  
  4. on adding folder items to this_folder after receiving added_items
  5.     tell application "Finder"
  6.         set foldName to the name of this_folder
  7.         set destPath to foldName & "Torrents"
  8.         try
  9.             repeat with i from 1 to count of items in added_items
  10.                 if name extension of item i in added_items is "torrent" then
  11.                     move (item i of added_items) as alias to folder destPath
  12.                 end if
  13.             end repeat
  14.         end try
  15.     end tell
  16. end adding folder items to
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement