Need Help, Unrar Script.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Silent44
Posts: 14
Joined: 26 Jan 2012 18:09

Need Help, Unrar Script.

#1 Post by Silent44 » 26 Jan 2012 18:19

Hello,

I have been tinkering with this for a bit and can't seem to figure it out, was hoping for some wisdom.

Here is my script thus far, and it works great for all rars made in the old format, ( *.r01, .r02, etc.) Everything unpacks to the set directory.
My problem is when faced with a new style rar in this form ( *.part001.rar, .part002.rar, etc.) the script just keeps repeating the process on this set and will not move on to the next directory in the list. The script keeps trying to unpack that same directory over and over. I tried to change the part where it says *.RAR to *.part*.rar, but didn't work.

_________________________________________________

@echo off
@CLS
set startdir=E:\Temp
set extractdir=F:\Incoming
setlocal enabledelayedexpansion
@ECHO UNRARer v 0.1
@ECHO (c)2009 Supagusti
@ECHO starting in directory: %startdir%
FOR /F "delims=;" %%G IN ('"dir "%startdir%\*.RAR" /S /B"') DO unrar e "%%G" *.mkv %extractdir%
@ECHO finished!

__________________________________________________

this script is obviously accompanied by the unRAR.exe app to work, was hoping for some help.

Thanks,
Ryan

Silent44
Posts: 14
Joined: 26 Jan 2012 18:09

Re: Need Help, Unrar Script.

#2 Post by Silent44 » 29 Jan 2012 08:04

Found my answer, for anyone this might help, here you go.

@echo off
@CLS
for /R %%i IN (.) do Rar.exe x "%%i/*.rar" D:\
@ECHO finished!


Cheers!

Post Reply