Skip to content

Instantly share code, notes, and snippets.

@bvanskiver
Last active April 24, 2021 04:14
Show Gist options
  • Save bvanskiver/8be45dcb5057c0d772fafccfcdda683e to your computer and use it in GitHub Desktop.
Save bvanskiver/8be45dcb5057c0d772fafccfcdda683e to your computer and use it in GitHub Desktop.
REM Package folder named .\1001\ in to zip file, use the * at the end to keep from creating a base folder in the zip file.
"C:\Program Files\7-Zip\7z.exe" a -tzip 1001.zip .\1001\*
REM Build single zip file for each folder in current directory.
for /D %d in (*) do "C:\Program Files\7-Zip\7z.exe" a "%d.zip" ".\%d\*"
REM Build single zip file for each folder in current directory and keep folder in root.
for /D %d in (*) do "C:\Program Files\7-Zip\7z.exe" a "%d.zip" ".\%d\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment