Reputation: 55
I have some code
SevenZipExtractor.SetLibraryPath(@"C:\Program Files\7-Zip\7z.dll");//x64
var cmpr = new SevenZipCompressor();
cmpr.CompressionFinished += (s, e) => { dof.DoFinishEvent(); cmpr = null; };
cmpr.BeginCompressDirectory("C:\\58", "C:\\Table\files\today\58.7z");
This code is work, but when I open 58.7z I Must to open all folders(table/files/today and then I see what inside). Maybe isset some possible to save without absolute path? Thanks!
Upvotes: 0
Views: 1997
Reputation: 13411
According to the source code, there is a boolean flag for exactly this purpose:
/// <summary>
/// Gets or sets the value indicating whether to preserve the directory structure.
/// </summary>
public bool DirectoryStructure { get; set; }
Upvotes: 1