| Home Forum Radio Memberlist Help Search Quick Links |
| Forum Index » Software | Hardware » Software » WinRar command promp |
| Software Software related issues |
![]() |
![]() |
|
Thread Tools | Display Modes | ![]() |
|
#1
|
|||
|
|||
|
WinRar command promp
hello all
I need some help running winrar from command line. I download a lot of files online and usually they come in this type of multiple rar files: dfa-lgs2-1.part01.rar dfa-lgs2-1.part02.rar dfa-lgs2-1.part03.rar etc... I need either a cmd script or a program that would unrar this for me. Usually I have about 20 different collections of these types of rar files in one folder. I would just like to run that script or program to unrar everything in that folder. I found a script " @setlocal @echo off set path="C:\Program Files\WinRAR\";%path% for /F %%i in ('dir /s/b *.rar') do call :do_extract "%%i" goto :eof :do_extract echo %1 mkdir %~1.extracted pushd %~1.extracted unrar e %1 popd " That does somewhat of a similar job, but its not 'smart' enough to understand that dfa-lgs2-1.part01.rar and dfa-lgs2-1.part02.rar are the same file and only needs to be extracted once. Instead it extracts dfa-lgs2-1.part01.rar and then tries to extract dfa-lgs2-1.part02.rar overwriting the first one. Has anybody else encountered anything similar and found a way to fix it? Thanks |
|
|
|
#2
|
|||
|
|||
|
winrar
Not sure if you are still looking for an answer, but I found that most of the archives start with something like ***.part01.rar or ***.part1.rar. I changed the line in the script:
for /F %%i in ('dir /s/b *.rar') do call :do_extract "%%i" to: for /F %%i in ('dir /s/b *part01.rar') do call :do_extract "%%i" or for /F %%i in ('dir /s/b *part1.rar') do call :do_extract "%%i" That seemed to do the trick or stopping the repeated extracts but it still created a bunch of empty directories. Better than nothing I suppose... Enjoy |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||