Friday, December 08, 2006

Opening RAR files using a simple bat file and UnRAR.exe

Extract the following zip file to C:\ drive.

UnRAR can also be obtained from WinRAR website

The batch file given below creates a folder under the name of the rar file being extracted and extracts the entire content of the folder

UnRAR.bat

@echo off
rem Extracting RAR files into folders
for %%a in (%1) do mkdir %%~na & cd %%~na & C:\UnRAR.exe x %%a
pause

To set UnRAR.bat as the default program for opening RAR files
  1. Right Click on an .rar file
  2. Click Open With
  3. Browse and select UnRAR.bat
  4. Check Always use the selected program to open this kind of file



Thanks
Debprakash





1 comment:

Alexis said...

For me rar files are very important files.Because a lot of films,music and etc I have in them.And couple days ago I had problems with rar files.Fortunately in inet I found next application-repair a rar.It is very reliable to my mind and software is free as is known.It helped me very qucikly.In addition tool can also analyzes and extracts files of any format from rar archives.