[SCRIPT] move torrent by tracker

Discussion of Transmission that doesn't fit in the other categories
Post Reply
Posts: 2
Joined: Sun Jul 18, 2010 8:43 am

[SCRIPT] move torrent by tracker

Post by rZn » Thu Dec 15, 2011 1:40 am

I did some searching for a way to sort my downloaded torrents into folders based by tracker.
Did not find any way to do that (please inform me if there is another way to do this..)

So I myself a ugly hackish little bash script.. but hey it works for me.. :roll: it should work for you to :wink:
I have only tried it with single tracker torrents.

Just change user and pass in the script and enable it in settings.json

Thanks to killemov for his nice rar and cleanup script :D
I did got the idea how to do it from his script.

Code: Select all

    # move_torrent.sh by rZn

      # Username for transmission remote.
      # Password for transmission remote.

TRACKER=$(transmission-remote -n $TR_USERNAME:$TR_PASSWORD -t$TR_TORRENT_ID -it | sed -n -e '/[:]/p' | awk '{print substr($0, index($0,$3))}' | cut -b8- | cut -d":" -f1)
transmission-remote -n $TR_USERNAME:$TR_PASSWORD -t$TR_TORRENT_ID --move ${TR_TORRENT_DIR}/${TRACKER}

Last edited by rZn on Sat Dec 17, 2011 8:14 pm, edited 1 time in total.

Posts: 552
Joined: Sun Dec 13, 2009 10:44 pm

Re: [SCRIPT] move torrent by tracker

Post by blacke4dawn » Thu Dec 15, 2011 9:24 am

You know, you should really edit out your own login info before posting things here. :mrgreen:

Posts: 2
Joined: Sun Jul 18, 2010 8:43 am

Re: [SCRIPT] move torrent by tracker

Post by rZn » Sat Dec 17, 2011 8:16 pm

hehe done.
I did remove it but I'd pasted wrong paste :p

Posts: 2
Joined: Sun May 03, 2020 2:25 am

Re: [SCRIPT] move torrent by tracker

Post by flying_sausages » Sun May 03, 2020 2:28 am

So I found this just now and I made some changes to this.A torrent with multiple trackers would create some pretty bizarre looking folders in the original so I fixed that and use only the first tracker.

https://gist.github.com/flying-sausages ... 5770dd2a80

Post Reply