Last active
October 11, 2023 08:16
-
-
Save rcerrejon/bdf2b44779965eed77874db9c79aa45b to your computer and use it in GitHub Desktop.
Batch Compress folders with 7zip in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
FOR %%i IN (*.*) DO ( | |
ECHO "%%i" | FIND /I "zip.bat" 1>NUL) || ( | |
"c:\Program Files\7-Zip\7z.exe" a -tzip "%%~ni.zip" "%%i" | |
if %ERRORLEVEL% == 0 del "%%i" | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment