7zip: Add files to new folder in archive via command line?
- by cschol
I am using 7zip for compressing a bunch of files.
The files are in a directory structure, like this:
MyDir\File1
MyDir\File2
MyDir\File3
MyDir\MoreFiles\File4
MyDir\MoreFiles\File5
I want to create a 7z file with the following structure via command line:
ZippedDir\File1
ZippedDir\File2
ZippedDir\File3
ZippedDir\MoreFiles\File4
ZippedDir\MoreFiles\File5
Basically, I want to zip the content of MyDir\ into a new folder called ZippedDir\. I know I could copy the content into a directory called ZippedDir\ and then zip this new directory.
However, I was wondering if there was a way to avoid this extra copy step and directly zip the content, if possible, via command line.