<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Automatically unRAR Your Torrents Using uTorrent</title>
	<atom:link href="http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/feed/" rel="self" type="application/rss+xml" />
	<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/</link>
	<description>THE source for BitTorrent &#38; P2P Tips, Tricks and Info.</description>
	<pubDate>Thu, 20 Nov 2008 22:59:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Nika</title>
		<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/#comment-12635</link>
		<dc:creator>Nika</dc:creator>
		<pubDate>Sun, 24 Aug 2008 21:37:13 +0000</pubDate>
		<guid isPermaLink="false">http://filesharefreak.com/?p=241#comment-12635</guid>
		<description>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 &#62;&#62;%LogDir%\DownloadsFolder.txt

find "%1" %LogDir%\LastDownloadsFolder.txt &#62;&#62;%LogDir%\CheckNew.log 2&#62;&#38;1
if %ERRORLEVEL%==0 goto :eof


:notfound
echo %1 not found!

echo %date% %time% &#62;&#62;%LogDir%\DownloadFound.txt
dir /b/s %1 &#62;&#62;%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.&#62;&#62;%LogDir%\DownloadFound.txt
echo Start Unrarring (%date% %time%): &#62;&#62;%LogDir%\DownloadFound.txt
"%WinRarDir%\unrar.exe" lb %1 &#62;&#62;%LogDir%\DownloadFound.txt

"%WinRarDir%\unrar.exe" e -o- %1 %3

echo.&#62;&#62;%LogDir%\DownloadFound.txt
echo Done Unrarring (%date% %time%): &#62;&#62;%LogDir%\DownloadFound.txt
for /F %%J in ('"%WinRarDir%\unrar.exe" lb %1') do dir %3\%%J &#62;&#62;%LogDir%\DownloadFound.txt
echo.&#62;&#62;%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</description>
		<content:encoded><![CDATA[<p>And here&#8217;s a script that will do the following:<br />
1. Check for new files in your downloads folder<br />
2. Unrar rar/zip/001 files</p>
<p>Hopefully everyone understands what&#8217;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&#8230;</p>
<p>Schedule the script using a Scheduled Task (or add it to each torrent like demonstrated in this tutorial).</p>
<p>Postie<br />
<a href="http://www.freedownloadscenter.com/Email_Tools/Command_Line_Mail_Tools/Postie_Download.html" rel="nofollow">http://www.freedownloadscenter.com/Email_Tools/Command_Line_Mail_Tools/Postie_Download.html</a></p>
<p>Winrar / Unrar<br />
<a href="http://www.rarlabs.com" rel="nofollow">http://www.rarlabs.com</a></p>
<p>Enjoy!! <img src='http://filesharefreak.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>@echo off<br />
set DownloadsDir=C:\Downloads<br />
set LogDir=C:\Scripts\log<br />
set PostieDir=C:\Scripts\postie<br />
set WinRarDir=C:\Program Files\WinRAR<br />
set SMTPHost=smtp.yourcompany.com<br />
set SMTPTo=yourname@yourcompany.com<br />
set SMTPFrom=yourname@yourcompany.com<br />
set SMTPSubject=Download Completed&#8230;</p>
<p>pushd %DownloadsDir%</p>
<p>for /R %%I in (*.*) do call :check_file %%~fsI %%~xI %%~psI</p>
<p>if exist %LogDir%\DownloadFound.txt goto :send_mail</p>
<p>goto :cleanup</p>
<p>:check_file<br />
echo %1 &gt;&gt;%LogDir%\DownloadsFolder.txt</p>
<p>find &#8220;%1&#8243; %LogDir%\LastDownloadsFolder.txt &gt;&gt;%LogDir%\CheckNew.log 2&gt;&amp;1<br />
if %ERRORLEVEL%==0 goto :eof</p>
<p>:notfound<br />
echo %1 not found!</p>
<p>echo %date% %time% &gt;&gt;%LogDir%\DownloadFound.txt<br />
dir /b/s %1 &gt;&gt;%LogDir%\DownloadFound.txt</p>
<p>if &#8220;%2&#8243;==&#8221;.rar&#8221; goto :unrar_file %1<br />
if &#8220;%2&#8243;==&#8221;.zip&#8221; goto :unrar_file %1<br />
if &#8220;%2&#8243;==&#8221;.001&#8243; goto :unrar_file %1<br />
goto :eof</p>
<p>:unrar_file<br />
echo.&gt;&gt;%LogDir%\DownloadFound.txt<br />
echo Start Unrarring (%date% %time%): &gt;&gt;%LogDir%\DownloadFound.txt<br />
&#8220;%WinRarDir%\unrar.exe&#8221; lb %1 &gt;&gt;%LogDir%\DownloadFound.txt</p>
<p>&#8220;%WinRarDir%\unrar.exe&#8221; e -o- %1 %3</p>
<p>echo.&gt;&gt;%LogDir%\DownloadFound.txt<br />
echo Done Unrarring (%date% %time%): &gt;&gt;%LogDir%\DownloadFound.txt<br />
for /F %%J in (&#8217;&#8221;%WinRarDir%\unrar.exe&#8221; lb %1&#8242;) do dir %3\%%J &gt;&gt;%LogDir%\DownloadFound.txt<br />
echo.&gt;&gt;%LogDir%\DownloadFound.txt<br />
goto :eof</p>
<p>:send_mail<br />
%PostieDir%\postie -host:%SMTPHost% -to:%SMTPTo% -from:%SMTPFrom% -s:&#8221;%SMTPSubject%&#8221; -file:%LogDir%\DownloadFound.txt</p>
<p>:cleanup<br />
del %LogDir%\LastDownloadsFolder.txt<br />
ren %LogDir%\DownloadsFolder.txt LastDownloadsFolder.txt<br />
del %LogDir%\DownloadFound.txt</p>
<p>popd</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: idolohouse</title>
		<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/#comment-2933</link>
		<dc:creator>idolohouse</dc:creator>
		<pubDate>Wed, 18 Jun 2008 00:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://filesharefreak.com/?p=241#comment-2933</guid>
		<description>FOR VISTA x64 USERS
fix this line
set path="C:\Program Files (x86)\WinRAR\";%path%</description>
		<content:encoded><![CDATA[<p>FOR VISTA x64 USERS<br />
fix this line<br />
set path=&#8221;C:\Program Files (x86)\WinRAR\&#8221;;%path%</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antd</title>
		<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/#comment-2854</link>
		<dc:creator>antd</dc:creator>
		<pubDate>Sat, 14 Jun 2008 16:05:26 +0000</pubDate>
		<guid isPermaLink="false">http://filesharefreak.com/?p=241#comment-2854</guid>
		<description>This doesn't work if, for example, your torrent is a pack of episodes subdivided into separate folders.</description>
		<content:encoded><![CDATA[<p>This doesn&#8217;t work if, for example, your torrent is a pack of episodes subdivided into separate folders.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Ngo</title>
		<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/#comment-2713</link>
		<dc:creator>Andrew Ngo</dc:creator>
		<pubDate>Sat, 07 Jun 2008 04:24:44 +0000</pubDate>
		<guid isPermaLink="false">http://filesharefreak.com/?p=241#comment-2713</guid>
		<description>EDIT: Seems like you got it going correctly :)</description>
		<content:encoded><![CDATA[<p>EDIT: Seems like you got it going correctly <img src='http://filesharefreak.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Ngo</title>
		<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/#comment-2712</link>
		<dc:creator>Andrew Ngo</dc:creator>
		<pubDate>Sat, 07 Jun 2008 04:18:19 +0000</pubDate>
		<guid isPermaLink="false">http://filesharefreak.com/?p=241#comment-2712</guid>
		<description>Best way would be to quote your directory's like "C:\xxx\xxx\xx"  it should work that way.</description>
		<content:encoded><![CDATA[<p>Best way would be to quote your directory&#8217;s like &#8220;C:\xxx\xxx\xx&#8221;  it should work that way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blaenk Denum</title>
		<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/#comment-2707</link>
		<dc:creator>Blaenk Denum</dc:creator>
		<pubDate>Fri, 06 Jun 2008 22:20:15 +0000</pubDate>
		<guid isPermaLink="false">http://filesharefreak.com/?p=241#comment-2707</guid>
		<description>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 :(</description>
		<content:encoded><![CDATA[<p>Yeah this is great but I&#8217;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&#8217;s not, so, oh well <img src='http://filesharefreak.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sharky</title>
		<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/#comment-2699</link>
		<dc:creator>sharky</dc:creator>
		<pubDate>Fri, 06 Jun 2008 15:41:59 +0000</pubDate>
		<guid isPermaLink="false">http://filesharefreak.com/?p=241#comment-2699</guid>
		<description>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:
&lt;strong&gt;C:\Documents and Settings\Sharky\My Documents\Downloads\&lt;/strong&gt;
And turn it into something like this:
&lt;strong&gt;C:\Docume~1\Sharky\Mydocu~1\Downlo~1\&lt;/strong&gt;
(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?
</description>
		<content:encoded><![CDATA[<p>Great.  Thanks for that.  The only problem is that this particular batch file doesn&#8217;t use any editable paths - it&#8217;s generic for whatever working directory it happens to be in.  So it gets confused when trying to translate the &#8216;C:\Documents and Settings&#8217; 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.<br />
Arguably this would be much more work - we&#8217;d have to take something like this:<br />
<strong>C:\Documents and Settings\Sharky\My Documents\Downloads\</strong><br />
And turn it into something like this:<br />
<strong>C:\Docume~1\Sharky\Mydocu~1\Downlo~1\</strong><br />
(although I&#8217;m not 100% sure of the &#8220;Mydocu~1&#8243; part - I forget that old Win3.11 stuff.) The username would also have to be truncated if it&#8217;s longer than 8 characters, as well.<br />
Am I on the right track, or totally off my rocker?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Ngo</title>
		<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/#comment-2698</link>
		<dc:creator>Andrew Ngo</dc:creator>
		<pubDate>Fri, 06 Jun 2008 15:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://filesharefreak.com/?p=241#comment-2698</guid>
		<description>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 :)</description>
		<content:encoded><![CDATA[<p>Very nice, to achieve the &#8220;My Documents&#8221; in a command in the batch file, you would need to type out the first 6 letters of the folder followed by a &#8220;~&#8221; and the number &#8220;1&#8243;.</p>
<p>Ex. typing in &#8220;cd mydocu~1&#8243; 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.  </p>
<p>or</p>
<p>You can put the syntax of the folder you want to command into Double Quotes.</p>
<p>Ex. typing in &#8220;cd &#8220;C:\Program Files\&#8221;  will direct your command box to the Program Files folder.  </p>
<p>Hope this helps <img src='http://filesharefreak.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a/s/l</title>
		<link>http://filesharefreak.com/2008/06/06/automatically-unrar-your-torrents-using-utorrent/#comment-2697</link>
		<dc:creator>a/s/l</dc:creator>
		<pubDate>Fri, 06 Jun 2008 14:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://filesharefreak.com/?p=241#comment-2697</guid>
		<description>great tutorial!</description>
		<content:encoded><![CDATA[<p>great tutorial!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
