Script to delete unwanted files from torrent dir

Got any great tips or tricks you're dying to share with the rest of the world? Then please post them here.
They don't have to be specifically related to building a media server but please do try to keep them suitably "geeky".
Posts: 33
Joined: February 10th, 2013, 10:34 pm

Script to delete unwanted files from torrent dir

Postby ricksebak » February 21st, 2013, 2:54 am

I use flexget with the main_file_only option, so that it only downloads the main file of video torrents. This works great for things that are downloaded via RSS. But whenever I download something manually it usually includes dumb nfo files, txt files, sample files, etc. So I made a script to run from cron that will scan all the directories in my torrent directory and delete all the files that aren't the main video files. It won't delete anything unless a directory size is 90% or more from video files, so it should be pretty safe.

Just putting this here in case anyone else finds it useful:

Return to “Tips 'n' Tricks”