FileShareFreak

THE SOURCE FOR BITTORRENT & P2P TIPS, TRICKS AND INFO

Automatically unRAR Your Torrents Using uTorrent

We all know how big of a pain it is having to extract all those RAR files after downloading a torrent, especially if it’s a large game ISO or DVDr movie. Even on a zippy computer it takes up to 5 minutes to extract a full DVD release - let alone if you’re stuck using an old clunker. So why not set up µTorrent to do the hard work for you while you’re at work or busy sleeping? Who doesn’t like the idea of waking up and finding your finished torrents already extracted, ready-to-watch?

This tip will allow you to set up µTorrent to automatically unRAR the files in a torrent once it’s finished downloading. Here’s how to do it:

You’ll Require:

µTorrent

WinRAR - be sure it’s installed to the default directory ( “C:\Program Files\WinRAR” ).

Step 1 — Create a batch file:

Download this batch file from here. Firefox users, click on the link, and just copy/paste the text into a new text document and save it as unrar.bat. Explorer users; you’ll be able to save the unrar.bat file to your hard drive. Another option - you can copy/paste the text from this link and save the file as unrar.bat.

Step 2 This tip will not work if your µTorrent’s download directory is in your “C:\Documents and Settings\…” folder, as unrar.exe cannot handle folders or filenames that contain any blank spaces. You’ll first need to change the download path in µTorrent, through Options > Preferences - click on the Downloads tab and put a checkmark in the box ”Put new downloads in”. Now, enter a path, (for example - C:\uTorrent). Click Apply to save the changes.

Step 3 — As stated above, this will not work for RAR files that have blank spaces in the name. Not to worry - any proper ’scene’ torrent will not have any spaces, so movies are a great option for this.

Move the file ‘unrar.bat‘ to your µTorrent’s ‘download’ directory for the folder you want to have unRARed.

(TIP - to open the desired folder; in µTorrent, right-click on an unfinished torrent, and select “Open Containing Folder” - now copy/move unrar.bat there).

Step 4 — Back in µTorrent, right-click the desired downloading torrent that you wish to extract, and select ”Properties…” at the bottom of the list.

Next, click on the Advanced tab. Now click on the [ ] link.

You’ll need to change the File Types to ”All Files” at the bottom:

Now, browse to the torrent folder from Step 3 that contains the unrar.bat file. For example, C:\uTorrent\some_movie_name. Click on unrar.bat, select OPEN.

You should now see the correct path in the Torrent Properties to your unrar.bat file. There should be no blank spaces in the path…click “OK” to finalize.

That’s it! Once the torrent has finished downloading, it will automatically extract the files from the RARs.

NOTE — This tip only works for one individual torrent at a time. To get it to work with multiple downloads, repeat the exact same procedures for each torrent, being sure to copy unrar.bat into each directory. If anyone has an idea of how to change the *.bat file to work through the entire µTorrent downloads directory, please let me know.

  1. a/s/l Says:

    great tutorial!

  2. Andrew Ngo Says:

    Very nice, to achieve the “My Documents” in a command in the batch file, you would need to type out the first 6 letters of the folder followed by a “~” and the number “1″.

    Ex. typing in “cd mydocu~1″ will get you to the my documents directory. For any folders that have spaces in them, you will need to revert back to the old days in the Windows 3.1 days where things can be shown fully.

    or

    You can put the syntax of the folder you want to command into Double Quotes.

    Ex. typing in “cd “C:\Program Files\” will direct your command box to the Program Files folder.

    Hope this helps :)

  3. sharky Says:

    Great. Thanks for that. The only problem is that this particular batch file doesn’t use any editable paths - it’s generic for whatever working directory it happens to be in. So it gets confused when trying to translate the ‘C:\Documents and Settings’ path - I guess the only workaround to this (besides changing your uTorrent download directory to something short like C:\utorrent) would be to edit the batch file and manually add the specific user path - but keep it in that dreaded 8-character limit.
    Arguably this would be much more work - we’d have to take something like this:
    C:\Documents and Settings\Sharky\My Documents\Downloads\
    And turn it into something like this:
    C:\Docume~1\Sharky\Mydocu~1\Downlo~1\
    (although I’m not 100% sure of the “Mydocu~1″ part - I forget that old Win3.11 stuff.) The username would also have to be truncated if it’s longer than 8 characters, as well.
    Am I on the right track, or totally off my rocker?

  4. Blaenk Denum Says:

    Yeah this is great but I’ve always been trying to figure out how to do it automatically to certain torrents instead of having to do it individually, of course this would be possible if uTorrent was extensible but it’s not, so, oh well :(

  5. Andrew Ngo Says:

    Best way would be to quote your directory’s like “C:\xxx\xxx\xx” it should work that way.

  6. Andrew Ngo Says:

    EDIT: Seems like you got it going correctly :)

  7. antd Says:

    This doesn’t work if, for example, your torrent is a pack of episodes subdivided into separate folders.

  8. idolohouse Says:

    FOR VISTA x64 USERS
    fix this line
    set path=”C:\Program Files (x86)\WinRAR\”;%path%

  9. Nika Says:

    And here’s a script that will do the following:
    1. Check for new files in your downloads folder
    2. Unrar rar/zip/001 files

    Hopefully everyone understands what’s being done. Needless to say you need to change the first variables to suite your specific situation, and you need to have winrar if you want to be able to unzip/unrar the files, and postie if you want to have the notification mail sent to you…

    Schedule the script using a Scheduled Task (or add it to each torrent like demonstrated in this tutorial).

    Postie
    http://www.freedownloadscenter.com/Email_Tools/Command_Line_Mail_Tools/Postie_Download.html

    Winrar / Unrar
    http://www.rarlabs.com

    Enjoy!! :)

    @echo off
    set DownloadsDir=C:\Downloads
    set LogDir=C:\Scripts\log
    set PostieDir=C:\Scripts\postie
    set WinRarDir=C:\Program Files\WinRAR
    set SMTPHost=smtp.yourcompany.com
    set SMTPTo=yourname@yourcompany.com
    set SMTPFrom=yourname@yourcompany.com
    set SMTPSubject=Download Completed…

    pushd %DownloadsDir%

    for /R %%I in (*.*) do call :check_file %%~fsI %%~xI %%~psI

    if exist %LogDir%\DownloadFound.txt goto :send_mail

    goto :cleanup

    :check_file
    echo %1 >>%LogDir%\DownloadsFolder.txt

    find “%1″ %LogDir%\LastDownloadsFolder.txt >>%LogDir%\CheckNew.log 2>&1
    if %ERRORLEVEL%==0 goto :eof

    :notfound
    echo %1 not found!

    echo %date% %time% >>%LogDir%\DownloadFound.txt
    dir /b/s %1 >>%LogDir%\DownloadFound.txt

    if “%2″==”.rar” goto :unrar_file %1
    if “%2″==”.zip” goto :unrar_file %1
    if “%2″==”.001″ goto :unrar_file %1
    goto :eof

    :unrar_file
    echo.>>%LogDir%\DownloadFound.txt
    echo Start Unrarring (%date% %time%): >>%LogDir%\DownloadFound.txt
    “%WinRarDir%\unrar.exe” lb %1 >>%LogDir%\DownloadFound.txt

    “%WinRarDir%\unrar.exe” e -o- %1 %3

    echo.>>%LogDir%\DownloadFound.txt
    echo Done Unrarring (%date% %time%): >>%LogDir%\DownloadFound.txt
    for /F %%J in (’”%WinRarDir%\unrar.exe” lb %1′) do dir %3\%%J >>%LogDir%\DownloadFound.txt
    echo.>>%LogDir%\DownloadFound.txt
    goto :eof

    :send_mail
    %PostieDir%\postie -host:%SMTPHost% -to:%SMTPTo% -from:%SMTPFrom% -s:”%SMTPSubject%” -file:%LogDir%\DownloadFound.txt

    :cleanup
    del %LogDir%\LastDownloadsFolder.txt
    ren %LogDir%\DownloadsFolder.txt LastDownloadsFolder.txt
    del %LogDir%\DownloadFound.txt

    popd

  10. AndrewGoldy Says:

    E:\MYCOMP~1\BACKUP~1.RAR not found!
    The system cannot find the path specified.
    E:\MYCOMP~1\CUTEPD~1.RAR not found!
    The system cannot find the path specified.
    E:\MYCOMP~1\FILEFO~1.RAR not found!
    The system cannot find the path specified.
    E:\MYCOMP~1\logs\DOWNLO~1.TXT not found!
    The system cannot find the path specified.
    E:\MYCOMP~1\logs\LASTDO~1.TXT not found!
    The system cannot find the path specified.
    The system cannot find the path specified.
    The syntax of the command is incorrect.
    The system cannot find the path specified.

    –> Seems NOT to like the short filenames !?!?!?!

  11. exigomusic.org Says:

    you don’t need a batch file noob.

  12. James Says:

    NIKA=champion

  13. CenturionXO Says:

    All of your examples are focused on C:\xxxx… Extracting an unknown RAR file in the directory where (usually) is your OS, is like firing a cigarette in a TNT warehouse. If you don’t have a sec. hard disk or an external one you should make a partition. Being smart with .bat is not a philosophy until you realize you were to stupid to unrar a nonsecure file into C.\….

  14. Big Dans Says:

    i have already downloaded the file what do i do? download again ?

Comments