Possible Duplicate: Create an archive from a directory without the directory name being added to the archive
I have a folder that I want to zip completely:
MyFolder | |--- SubFolder1 |--- SubFolder2 |--- file1 |--- file2I want to zip everyting into myzip.7z, but I don't want 'MyFolder' to be inside the archive:
myzip.7z | |--- SubFolder1 |--- SubFolder2 |--- file1 |--- file2instead of
myzip.7z | |--- MyFolder | |--- SubFolder1 |--- SubFolder2 |--- file1 |--- file2How do I do that?
01 Answer
This is how I did it.
cd MyFolder
7z a -r ../myzip *This creates the archive (myzip.7z) in the parent of MyFolder rather than in MyFolder directly.
Alternatively (without first changing into MyFolder):
7z a myzip ./MyFolder/* 4