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: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


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