# Migrate from uTorrent to KTorrent

How would I transfer data from uTorrent(windows) to KTorrent(Ubuntu)? I have hundreds of files that were seeding in windows, all fully downloaded.

-
Just a note, you can run utorrent in wine. –  MrStatic Aug 21 '10 at 13:37
Would it have same performance for large number of torrents/connections? –  Pablo Aug 21 '10 at 14:36

I hope that there is a more elegant way than one I'm going to suggest, but if nothing comes up, this could help.

Make sure that windows disk is visible from Ubuntu. Get all .torrent files for torrents you are seeding in µTorrent. Then open them in KTorrent one by one. Once KTorrent asks you where you want to save files, chose same location where you downloaded them from windows. KTorrent should detect percentage downloaded and continue downloading further. Since the downloads are complete it should start seeding.

Of course, try this out with smallest torrent first, just in case something goes wrong.

EDIT

Preliminary results:

First step for me was to open KTorrent and open configure KTorrent settings. There under Application there should be option Default save location. Set it to location where data from torrents is downloaded. After that button labeled OK is to be clicked. Then we proceed to next step.

Second step is to test settings. Open favorite terminal application. I personally like Konsole. Then type:

ktorrent \path\to\torrent\file\foo.torrent --silent


This will add torrent to ktorrent and start downloading it with out user intervention. Process will be run in background, so same shell can be used again. It should detect that torrent is already downloaded and switch to seeding mode. ktorent --silent can be run even if ktorrent is already running and will add any new torrents to running instance.

Try this out and report how it works.

Third step: Bash script which should detect all .torrent files in a directory and call ktorrent for each of them :

After completing first two steps, and making sure that they worked correctly, open you favorite console application and navigate to directory where the .torrent files are. then type following:

gedit script.sh


gedit window will open. Paste following code in it:

#!/bin/bash

for f in  *.torrent #this will list through every .torrent in working directory
do
echo "Proccessing $f file..." ktorrent "$f"  --silent #this will call ktorrent for every .torrent file detected
done


Click save. The script will be saved. Next thing we need to do is to allow it to execute.

Type:

chmod +x script.sh


This will make script executable. Finally, run it by typing:

./script.sh


It should add all torrents in directory to ktorrent. This way you'll save the effort needed for manually adding hundreds of torrents.

-
This is the same thing you'd do when moving to any torrent client –  Sathya Aug 21 '10 at 13:50
@Sathya Indeed it is. That's why I hope that someone will provide better answer. Doing this procedure for hundreds of files can take thousands of seconds and can be impractical. –  AndrejaKo Aug 21 '10 at 14:36
So there is no automated way? Considering that I have many of them, it will be not easy to add one by one... –  Pablo Aug 21 '10 at 14:37
@Michael AFAIK there is no automated way :( –  Sathya Aug 21 '10 at 14:53
@Michael I meant the directories where the downloaded files are stored. Anyway, I'll take a look and report the results. –  AndrejaKo Aug 21 '10 at 16:09

Just to note instead of opening a file saving a script making it executable and such you can just execute the whole thing in one line like this:

for f in  *.torrent; do echo "Processing $f";ktorrent "$f"  --silent;done


Just make sure you are in the directory with torrent files when you do.

-