PDA

View Full Version : [TuT] How 2 Auto-Unrar Using uTorrent !!



Aurion
01.07.08, 16:38
Well,first of all Hey there !! How are ya all,hope you are doing fine so far !! Well,as always every time I come across a Trick/Tweak while screwing with my PC,I prefere to post it down here so that everyone can benefit from it !! Anyway,this time its a nice simple TuT that makes you get to know how to Auto-Unrar files using uTorrent without worrying about extracting them manually every time a Big File (Especially Games,Large Scene Packs .. etc) gets done downloading,so here how it goes :

Required Toolz :

1. uTorrnet Installed (usually in C:\Programs Files).

2. Winrar Installed (usually in C:\Program Files\Winrar).

3. A Batch File to Run Apply the Trick.


Q : What is the Idea ?

A : Well,its about Unraring Some Files without worrying how to Switch to the appropriate tools to get those Files out of their Boxes !! :biggrin:

Its Like this :


1. Open a CMD Window :


Start > Run > CMD

2. Add the Winrar Toolz to the path :


C:> set path="C:Program FilesWinRAR";%path%


3. Switch to the directory where you want your files to be extracted to:


C:> CD /d Z:some_folder

4. Use unrar to extract the Specified File:


Z:some_folder> unrar e C:some_rar_file.rar


So We Need a Batch File in order to get rid of this SIlly Headache,right ? :tongue:

Q : How Do I Generate the Batch File ?

A : Well here is the list of codes that you need to put in a Notepad file to Generate the Batch File :


@REM ------- BEGIN demo.cmd ----------------
@setlocal
@echo off
set path="C:Program FilesWinRAR";%path%
for /F %%i in ('dir /s/b *.rar') do call :do_extract "%%i"
goto :eof

:do_extract
echo %1
mkdir %~1.extracted
pushd %~1.extracted
unrar e %1
popd

REM ------- END demo.cmd ------------------

Instructions:

1. Create "unrar.bat" using the script on the page above
2. Copy "unrar.bat" inside the folder you're downloading
3. On uTorrent, right-click the torrent > Properties > Advanced Tab > Click "..."
4. Choose "All files (*.*)" at the bottom then browse for the bat file


Ta Taaah !! We are done now,Just run the Batch File Everytime you want to extract something before you go to sleep then you wont worry about Extracting when you get up anymore,for sure you will just need to modify the rar's name in the notepad file before switching to a newer file :top:

Hope this Comes to all of you !! :biggrin:

anon
01.07.08, 20:59
2. Add the Winrar Toolz to the path :


c:> set path="C:Program FilesWinRAR";%path%


3. Switch to the directory where you want your files to be extracted to:


c:> cd /d z:some_folder

4. Use unrar to extract the Specified File:


z:some_folder> unrar e c:some_rar_file.rar

mmm you have the backslash problem there :frown: replace what's between CODE tags with these images i made for you :smile::

2. http://img122.imageshack.us/img122/2111/111pp3.gif
3. http://img122.imageshack.us/img122/9783/222tx2.gif
4. http://img122.imageshack.us/img122/2186/333kq9.gif



@REM ------- BEGIN demo.cmd ----------------
@setlocal
@echo off
set path="C:Program FilesWinRAR";%path%
for /F %%i in ('dir /s/b *.rar') do call :do_extract "%%i"
goto :eof

:do_extract
echo %1
mkdir %~1.extracted
pushd %~1.extracted
unrar e %1
popd

REM ------- END demo.cmd ------------------

the same here...

http://img122.imageshack.us/img122/9132/444lo7.gif

of course you can't copy the text from the image to notepad :/ but it's a matter of replacing:

set path="C:Program FilesWinRAR";%path%

with

set path="%programfiles%\WinRAR";%path%

:biggrin:

and TY for the tut :top: very useful for people that leave their computer downloading overnight. when they wake up, completed torrents will have already been extracted so that they don't waste time :)

Rebound
01.07.08, 23:28
Ok guys. Iīve found the bug. :wink:

Please uncheck the auto media emded button, than it works correct. :top:
The auto media thinks with a backslash our code is an url and change it.

Little screen:

http://img161.imageshack.us/img161/2580/bugxt2.png

Uncheck and then it works perfect. :wink:

I think itīs the best, if you edit all old threads, because itīs a bit difficult to write it from the images. :wink:

best regards and sorry for this stupid bug,

Rebound

anon
01.07.08, 23:42
glad the problem is solved now :)

wonder why the media embedding code handles backslashes... they are illegal characters in an url. maybe it thinks we made a mistake typing it and deletes all \'s from the would-be link to retrieve; pretty much like most browsers change them to /'s instead (type www.google\.com and you'll see ^^)

Aurion
02.07.08, 05:40
@ anon: Done buddy,sorry for not noticing that in the first place its just that I have hundreds of TuTs inside my PC saved as notepads so I just copy/paste the main frames & only manually write the Introduction myself !! :biggrin:

@ Rebound: Thanks buddy for fixing that Bug,man you are so damn Fast :klatsch_3:

Grambo
16.11.08, 01:43
you could just use Autounpack instead. this is simpler.
no need for a batch.