Last active
March 15, 2024 13:34
-
-
Save BenMcLean/526b2e3c182e3a498203c9be69471790 to your computer and use it in GitHub Desktop.
7-zip batch
This file contains hidden or 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 | |
cd %~dp0 | |
for /R %%F in (*.3ds) do ( "c:\Program Files\7-Zip\7z.exe" a "%%F.7z" "%%F" & if not errorlevel 1 del "%%F" ) | |
@PAUSE |
This file contains hidden or 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 | |
cd %~dp0 | |
for /f "eol=: delims=" %%F in ('dir /b /a-d ^| findstr /vixc:"%~nx0"') do ( "c:\Program Files\7-Zip\7z.exe" a "%%F.7z" "%%F" & if not errorlevel 1 del "%%F" ) | |
@PAUSE |
This file contains hidden or 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 | |
cd %~dp0 | |
for /d %%X in (*) do ( "c:\Program Files\7-Zip\7z.exe" a "%%X.7z" "%%X\" & if not errorlevel 1 rd /s /q "%%X" ) | |
@PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment