Compress Multiple Folders Into Mutiple Zip Files Code
Use the code below to compress multiple folders into their own seperate individual zip files. Simply follow these steps:
- Downoad 7-zip from this link:https://www.7-zip.org/
- Navigate to folder where to compress the files
- Create new text file with notepad and save it (any name you want) with .bat extension
- Copy the code on this page depending on what compression format you need
- Paste this code (as plain text) into the bat file you created in step 3
- Double click on .bat file
Choose your compression format
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.7z" "%%X\"
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.gzip" "%%X\"
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.tar" "%%X\"
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.wim" "%%X\"
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.b2zip" "%%X\"
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.xz" "%%X\"