Skip to content

Instantly share code, notes, and snippets.

@pmarreck
Created April 17, 2019 21:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmarreck/83d0a9b6dc319c98d30a7156682322f8 to your computer and use it in GitHub Desktop.
Save pmarreck/83d0a9b6dc319c98d30a7156682322f8 to your computer and use it in GitHub Desktop.
How to convert a directory of .zip files to .7z (7zip) in Windows
for %%F in (*.zip) do ( "C:\Program Files\7-Zip\7z.exe" x -y -o"%%F_tmp" "%%F" * & pushd %%F_tmp & "C:\Program Files\7-Zip\7z.exe" a -y -r -m0=lzma2 -mx=9 -t7z ..\"%%~nF".7z * & popd & rmdir /s /q "%%F_tmp" )
@roslof
Copy link

roslof commented Jul 11, 2020

Found via Internet search. Bravo! Clean, simple and reliable.

@sagman76
Copy link

Lovely Jubbly. Needed for a Mame romset. Thanks!

@pmarreck
Copy link
Author

@sagman76 That's probably exactly what I needed it for, as well, lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment