برنامه Notepad را باز کنید و کد روبرو را درون آن کپی کنید
فایل بوجود آمده را در هر جایی که می خواهید پوشه هاشو به صورت فشرده در بیارید، قرار بدید و اجرا کنید.
How to Use 7Zip to Create Multiple Compressed Folders in One Go
This article will show you how to use the free software 7zip to create multiple compressed folders in one go. This may come in handy for times when you are backing up your computer files or for whenever you need to compress a lot of file folders in general. This method involves using 7zip in a Windows batch file.
1. Install 7zip. If you let it install in its default setting it should typically be in “C:\Program Files\7-zip\7z.exe.”
2. Fire up Notepad. You won’t need to use 7zip’s graphical user interface, so no need to run it after installing.
3. In Notepad, insert this single line of code: for /d %%X in (*) do “c:\Program Files\7-Zip\7z.exe” a “%%X.7z” “%%X\”
4. Note: If you’d like to output to .ZIP files, change the “%%X.7z” to “%%X.zip”
5. Click ‘File’ then ‘Save As’.
6. Browse to the location of the folders you want to compress.
7. Create your very own batch file by setting ‘Save as type’ to ‘All files’ and naming it something like ‘foldertomultiple7z.bat’. Take note of the file extension, which is .bat. Be sure not to set the file type as ‘Text Documents’ too.
8. Click Save.
9. Close Notepad and navigate to your folder. Notice that the batch file is at the same directory level as the folders that need to be compressed.
10.Run the batch file by double-clicking on your bat file within your folder. DO NOT run as Administrator