Jump to content

Program to Batch unrar


Recommended Posts

I was hoping someone could write a really batch file (or something simply) to parse through the subfolders of a directory and unrar everything in them to a common folder that I choose.

Thanks

]Bonkers[

Link to comment
Share on other sites


@echo off
setlocal
if "%1"=="" goto usage
if "%2"=="" goto usage
if not exist %1 goto iesrc
for /f "delims=;" %%i in ('dir /b /ad %1') do (unrar e -o+ -inul %1\%%i\*.rar %2)
goto end
:usage
echo unrargui sourcefolder destinationfolder
goto end
:iesrc
echo sourcefolder %1 does not exist
goto end
:end
endlocal

This should do the job. If you don't want the error management remove all line except the one begining with for.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...