Thanks Markhor, apologies for the belated reply!
2)Do you mean you specify not the first volume but I say second or third? Is the list of archive files is incomplete in multivolume rar archives?
I am unfamiliar with the structure of the files and what metadata they contain, but what I was after was a way to determine the list of filenames needed to extract a multivolume archive given one of the files. Not sure if this is possible. For example:
List<string> filenames = GetFilesNeededForArchive(@"c:\data.r03"); // Should return "c:\data.rar","c:\data.r00","c:\data.r01","c:\data.r02","c:\data.r03","c:\data.r04"...
List<string> filenames = GetFilesNeededForArchive(@"c:\data.rar"); // Should return the same as above.
Regarding the first feature, due to the specific multivolume 7zip implementation, one can't determine whether all volumes exist during open (that is, in SevenZipExtractor constructor). You have to call Check() to ensure the
archive is valid.
Ok, thanks. Check() essentially does an extract and discards the uncompressed data, correct?
As for the third feature, one has to pass the main rar to the SevenZipExtractor constructor. Correct me if i'm wrong.
My problem is that it is difficult to know which is the main rar file programmatically. Yes, I can always do some logic like "if matches regex for "(FILE).part01.rar" select "(FILE).rar" if matches regex for "(FILE).r[0-9]*"
select "(FILE).rar" but I was just wondering if there was an easy way to do this, which would be future proof (in case some other naming scheme becomes convention (001, 002, ... for example).