Mikeri's tech-babble

2009-10-27

Automatic directory spesific saving of torrent-files in Firefox

There is (as far as I know anyway) no easy way to specify which directory to save files in by file types in Firefox. There are addons, but the only good one I found required you to open the Open-or-Save-as requester. Therefore, I made this little shell-script:

#!/bin/bash
mv $1 ~/torrents/
rename 's/\[.*?\]//g' ~/torrents/$1
exit

Save this script and do a chmod u+x on it, then point Firefox to use it on torrent files. (Edit/Preferences/Applications) Obviously, change the directory to where you want your torrent files. Of course this can be used for other file types as well.

The script also strips out those annoying square bracketed site ads like [ISOHunt] etc. (Square brackets seemed to confuse rtorrent here.)

Labels: , , , , , , , , , , , ,

0 comment(s):

Post a Comment



<< Home