I have the following folder structure:
- root
- folder1
- folder2
- folder3
- 7za.exe
I want to run the 7-zip command line tool to compress all the files in folder1 to a zip file called folder1.zip.
Running the following
7za.exe a -tzip folder1.zip folder1\\*.*
produces a zip file as expected. However, when I open the zip file, it has a folder in it called folder1, and inside that I have all the files that were inside that folder. I don't want the folder name added to the zip folder, i.e. I would like to add all the files in a "Flat" file format.
I also don't want to recursively run the command line tool for each individual file/folder.
Is there a switch that provides this functionality?
cdinto folder1 and7za.exe a -tzip ..\folder1.zip *.*? – zpletan Sep 26 '11 at 17:09start ..\7za.exemight fix that but it's messy and 7-Zip should be able to do this, without having to do that. – bat_cmd Sep 14 '22 at 13:08