How to Use 7Zip to Create Multiple Compressed Folders in One Go
Install 7zip., Fire up Notepad., In Notepad, insert this single line of code: for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.7z" "%%X\" , Note: If you'd like to output to .ZIP files, change the "%%X.7z" to "%%X.zip" , Click 'File' then...
Step-by-Step Guide
-
Step 1: Install 7zip.
If you let it install in its default setting it should typically be in "C:\Program Files\7-zip\7z.exe." -
Step 2: Fire up Notepad.
You won't need to use 7zip's graphical user interface, so no need to run it after installing. ,,,, In our example it is in C:\My Music. , Take note of the file extension, which is .bat.
Be sure not to set the file type as 'Text Documents' too. ,, Notice that the batch file is at the same directory level as the folders that need to be compressed. , DO NOT run as Administrator (option appears in right-click menu)
- running as Administrator will compress the files in windows/system32.
After you double-click on the bat file, the windows command prompt appears and 7zip begins to do its thing.
The windows command prompt disappears when all compressed folders are created.
You should now see them inside your folder. , To do this, highlight them all and click the right mouse button.
If you installed 7zip in its default setting, you'll have its menu incorporated in the Windows shell.
Navigate to it and click 'Test Archive.' 7zip should report that there are no errors in your archive.
You are done creating multiple compressed folders in one go using 7zip.
You can now move them to the external hard drive.
You can delete the batch file you created or move it to a different folder. -
Step 3: In Notepad
-
Step 4: insert this single line of code: for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.7z" "%%X\"
-
Step 5: Note: If you'd like to output to .ZIP files
-
Step 6: change the "%%X.7z" to "%%X.zip"
-
Step 7: Click 'File' then 'Save As'.
-
Step 8: Browse to the location of the folders you want to compress.
-
Step 9: Create your very own batch file by setting 'Save as type' to 'All files' and naming it something like 'foldertomultiple7z.bat'.
-
Step 10: Click Save.
-
Step 11: Close Notepad and navigate to your 'My Music' folder.
-
Step 12: Run the batch file by double-clicking on your bat file within your 'My Music' folder.
-
Step 13: Verify the validity of your compressed folders.
Detailed Guide
If you let it install in its default setting it should typically be in "C:\Program Files\7-zip\7z.exe."
You won't need to use 7zip's graphical user interface, so no need to run it after installing. ,,,, In our example it is in C:\My Music. , Take note of the file extension, which is .bat.
Be sure not to set the file type as 'Text Documents' too. ,, Notice that the batch file is at the same directory level as the folders that need to be compressed. , DO NOT run as Administrator (option appears in right-click menu)
- running as Administrator will compress the files in windows/system32.
After you double-click on the bat file, the windows command prompt appears and 7zip begins to do its thing.
The windows command prompt disappears when all compressed folders are created.
You should now see them inside your folder. , To do this, highlight them all and click the right mouse button.
If you installed 7zip in its default setting, you'll have its menu incorporated in the Windows shell.
Navigate to it and click 'Test Archive.' 7zip should report that there are no errors in your archive.
You are done creating multiple compressed folders in one go using 7zip.
You can now move them to the external hard drive.
You can delete the batch file you created or move it to a different folder.
About the Author
Stephen Carter
Professional writer focused on creating easy-to-follow creative arts tutorials.
Rate This Guide
How helpful was this guide? Click to rate: