uTorrent automatization on external drive

I move around pretty much during the day and since my notebook has this little overheating-and-stops-working issue I just carry around my external 2.5″ hdd usb drive(which is wonderful since it doesn’t need and extra power adapter,  just a mini usb cable).

Well, I wanted to start to download uTorrents whenever I got to a computer but I wanted to automate it and hide it a bit so when I’m downloading I don’t stand out.

So my config:

There are two batch files, a resume.bat a cleanRun.bat, since when you plug your drive into a different computer it is very probable the drive letter will change and utorrent uses full paths in its resume file.

So I had to remove the resume file from uTorrents configuration directory.

But now I have to reload every torrent anew each time I run the cleanRun.bat and preferably not open torrents
I’ve aleady downloaded.
So I created some folders:
uTorrent/ <-here goes the uTorrent.exe and settings.dat
TORRENTS/2OPEN/ <-torrent load folder
TORRENTS/BACKUP/ <-a backup folder for torrents…
TORRENTS/FINISHED/ <-here the finished torrents are moved
TORRENTS/ <-open torrents go here
DOWNLOADING/ <-downloading downloads go here
FINISHED/ <-finished downloads go here

So…in the uTorrent configuration, go to the Directories tab,
tick the “Put new downloads in:” and in the box put “..\DOWNLOADING”
tick the “Move completed downloads to:” and “..\FINISHED”
tick “Only move from the default download directory”
tick “Store .torrents in:” and put in the box “..\TORRENTS”
tick “Move .torrents for finished jobs to:” and “..\TORRENTS\FINISHED”
tick “Automatically load .torrents from” and also “Delete loaded .torrents”
and put in the box “..\TORRENTS\2OPEN”.
(the two options left should be left unticked)

now, a recap:
(..\ means parent folder)
when a download starts it gets stored in the DOWNLOADING folder and when it finishes it goes to the FINISHED folder only if it was in the DOWNLOADING folder.

When a .torrent is opened it is copied to TORRENTS folder.

When a torrent is finished it is moved to TORRENTS/FINISHED and any torrents are loaded from TORRENTS/2OPEN and deleted.

Now, the resume.bat should just open uTorrent. END.

While the cleanRun.bat must:
-remove/move uTorrent/resume.dat and uTorrent/resume.dat.old
-move torrents in TORRENTS to TORRENTS/2OPEN

Assuming your be located in the same level as your folders:

@echo off
echo “Move torrents to be opened…”

echo “Backup torrents…”

echo “Remove resume settings…”
move uTorrent\resume.dat TORRENTS\BKP\
move uTorrent\resume.dat.old .TORRENTS\BKP\

echo “Start uTorrent…”
start .\utorrent.exe /RECOVER /HIDE

The option /RECOVER enables to open a second instance of uTorrent if uTorrent is already running and /HIDE starts uTorrent in hidden mode (boss-key mode)
Obs.: if there is no bosskey set, you wont be able to make uTorrent ‘unhide’, you will have to kill the process and begin utorrent without the hidden option.

You can also, to hide uTorrent running on your computer, create an icon named ‘tray.ico’ in the same folder as the settings.dat and next time you open uTorrent the tray icon will be changed to tray.ico.(Useful if uTorrent is set to go to tray if minimized)

Unfortunately I haven’t found a way to change the working directory of a torrent automatically so that it is not need to remove and reload(and re-check) the torrent which can take a while depending on the torrents size.

To close uTorrent.exe ‘automatically’ I am experimenting with some software.
I’ve read but not tried http://forum.utorrent.com/viewtopic.php?id=34067 yet since the fullpath is required
to close the program and since the path changes (and the whole idea of this is to make utorrent directory dynamic) I’ve ignored it. Another one I got somewhere sends the WM_Close handle but it only works when uTorrent’s window is open.

You could always kill uTorrent but it’s not a very healthy action towards the next time you open uTorrent because it will recheck all torrents and it’s possible write errors happen which are not welcome at all.

Well, either way, when using a software that will close uTorrent automatically you can create only one batch

@echo off
echo “Move torrents to be opened…”

echo “Backup torrents…”

echo “Remove resume settings…”
move uTorrent\resume.dat TORRENTS\BKP\
move uTorrent\resume.dat.old .TORRENTS\BKP\

echo “Start uTorrent…”
start .\utorrent.exe /RECOVER /HIDE

*whatever software you have*

since pause will ask you to press a key to continue giving you the choice to leave utorrent open as long as you wish.
The problem is that a cmd.exe window will be permanently open which you can overcome by having a separate script as ‘closer’ which you run when you want to leave/close uTorrent.

You could also set the cleanRun.bat to be opened by autorun.inf on the hard drive and on computers with Windows XP SP2 /SP3 the script would be run automatically whenever you plug your external drive into the computer.

To avoid reopening all torrents each time, it would be possible to save the last known drive letter uTorrent was run from to check if it’s the same on the next start and just resume all torrents… Someday I’ll write it perhaps.

(yeah..all these steps are not that complicated but it takes a while to get to the final solution..or one of them at least)


2 Responses to “uTorrent automatization on external drive”

  1. 1 snowlyjam
    2013/07/09 at 05:41


    • 2013/07/09 at 11:30


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

The Author

Older Ramblings


Linux User Sig

%d bloggers like this: