Compress all Subfolders in a Folder

First, set the current drive at the prompt:

C:

and the location to the folder to compress with WinRAR:

SET "origloc=C:\RarIt"

after that, run the script:

cd %origloc%
for /D %%s in (.\*) do "C:\Program Files (x86)\WinRAR\rar.exe" a -ep -ep1 -m0 -v50000 -df "%%s.rar" "%%s"
 
@ECHO OFF
FOR %%F IN ("%origloc%\*.part*.rar") DO CALL :process "%%F"
GOTO :EOF
 
:process
CALL :checkpath "%~dpn1"
MOVE %1 "%subfolder%" >NUL
GOTO :EOF
 
:checkpath
SET "subfolder=%~dpn1"
IF NOT EXIST "%subfolder%\" MKDIR "%subfolder%"
GOTO :EOF
 
pause

fuss/winrar.txt ยท Last modified: 2017/02/22 18:30 (external edit)

Access website using Tor Access website using i2p


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.