Does anyone know of a application that allows you to create torrent files via the command-line in Windows?

Update: I need a command-line version because I'm a programmer. I need to create the torrent programmatically, I can't have a window pop-up. There's a ton of uses for command-line torrent creation and I think it's very strange that I havent found a command line version from my hours of searching the Internet.

  • 2
    Why would you want to? Is there a problem that GUI based solutions don't solve? – Supercereal Dec 30 '10 at 21:17

Alternative 1) mktorrent for Windows:

Mktorrent is a very easy tool for creating Torrents on the commandline, but only for Linux (only Sourcecode to compile self) – so i compiled a Win32/Win64 Version over Cygwin.

Installation: Copy the mktorrent.exe and the DLLs in \Windows\System32\
On Server 2008 R2 Copy the mktorrent.exe in \Windows\System32\ , and the DLLs in \Windows\SysWOW64\

Usage i.e.: mktorrent -l 21 -a http://tracker.url foldername

Alternative 2) py3createtorrent:

py3createtorrent is a comprehensive shell/commandline utility for creating torrents (Linux & Windows). It's a GPL-licensed Python v3.1 script. I tested it with Ubuntu 8.04 / rTorrent and Windows 7 / µTorrent.

  • The mktorrent link no longer works. Is there a build of mktorrent for Windows available somewhere else? – odie5533 Mar 27 '15 at 22:03
  • You're right, the link is rotten. As far as I remember, it can be run on Windows under MinGW/Cygwin. – Mehper C. Palavuzlar Mar 29 '15 at 20:22

Transmission comes with transmission-create which is a command-line utility to create .torrent files.

Usage: transmission-create [options] <file|directory>

 -h --help              Display this help page and exit
 -p --private           Allow this torrent to only be used with the specified
 -o --outfile <file>    Save the generated .torrent to this filename
 -c --comment <comment> Add a comment
 -t --tracker <url>     Add a tracker's announce URL
 -V --version           Show version number and exit

Instructions for building Transmission on Windows.

  • 1
    Transmission doesn't seem to be available for Windows. – Jesse McGrew Jun 20 '13 at 17:58
  • I don't see any binaries available, but it can probably be compiled under Windows (Cygwin). – Cristian Ciupitu Jun 20 '13 at 19:15

mktorrent mentioned by Mehper C. Palavuzlar will do the job. Sample usage is

    mktorrent.exe -l %piece_size% -a %tracker_announce_url% %folder_or_file%

Piece size is power of 2, i.e. -l 22 will create a torrent file with pieces of 2^22 bytes = 4 MB.

mktorrent is currently maintained by Rudde:

To build it on Windows from sources you'll need GNU Make which you can get from MinGW-w64, for example.

To build mktorrent for Windows 32-bit (provided you have make in your Windows' PATH environment variable and that current working directory is of mktorrent source code files):

    make CC=i686-w64-mingw32-gcc USE_LONG_OPTIONS=1 USE_LARGE_FILES=1

To build mktorrent for Windows 64-bit:

    make CC=x86_64-w64-mingw32-gcc USE_LONG_OPTIONS=1 USE_LARGE_FILES=1

mktorrent.exe and prefix.exe will be built.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy