Batch create torrents from folders

Discussion of Transmission that doesn't fit in the other categories
Post Reply
transflava
Posts: 12
Joined: Thu Jun 21, 2012 11:19 am

Batch create torrents from folders

Post by transflava »

I wanted to create torrents for all folders in a given directory.
Requirement: ignore hidden directory and files, create torrent only for folders.

This is how to do it:

Code: Select all

find -L -maxdepth 1 -type d -name '*' ! -name '.*' -printf '%f\n' | while read file
do
transmission-create -t  "http://tracker.com" -p -o "$file".torrent  "$file";
done
anoxy
Posts: 1
Joined: Fri Aug 17, 2012 11:44 pm

Re: Batch create torrents from folders

Post by anoxy »

Could you explain to a noob how this is done?
transflava
Posts: 12
Joined: Thu Jun 21, 2012 11:19 am

Re: Batch create torrents from folders

Post by transflava »

This is for *nix only. If you want to have torrent for each folder (Album 1, Album 2). If you open console you just paste the code and press enter. Torrents Albumname1.torrent and Albumname2.torrent appear after which you can use them to seed them etc.
Post Reply