Skip to content

Instantly share code, notes, and snippets.

@pmarreck
Created April 17, 2019 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmarreck/385c68cb99b33be2cbfdc5019df19510 to your computer and use it in GitHub Desktop.
Save pmarreck/385c68cb99b33be2cbfdc5019df19510 to your computer and use it in GitHub Desktop.
How to 7zip (lzma2 @ max compression) a bunch of files individually in a directory in Windows (assuming you are already in said directory with the command prompt)
# Use this one-liner:
for %i in (*.*) do "c:\Program Files\7-Zip\7z.exe" a -m0=lzma2 -mx=9 "%~ni.7z" "%i"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment