This project is read-only.

CompressFiles and keep path (directory structure)

Dec 1, 2013 at 3:52 PM
Using SevenZipCompressor (named c) from 0.64 and .Net 4.0 in 64 bits windows 8.1.
c.CompressionMode = SevenZip.Create;
c.PreserveDirectoryRoot = true;
c.DirectoryStructure = true;
c.CompressDirectory(aDirectoryName, archiveName);
c.CompressionMode = SevenZip.Append;
c.CompressDirectory(anotherDirectoryName, archiveName);
c.CompressFiles(archiveName, fullFileNames);

Directories (in the archive) are created representing the 2 calls to CompressDirectory(),
however, the call to CompressFiles() adds the files at the archives "top level", i.e. structure is lost.

How to do correctly ?
(Actually what I want to do is to CompressDirectory() but only partly and not by search pattern, but by an array of filenames or something similar).