I have multi-part RAR files in the same folder and I want to check if all parts of the RAR exist. I am using SharpCompress v0.24, here is my code:
using (var archive = RarArchive.Open("D:/Ontology tool.part1.rar"))
{
foreach (RarVolume vol in archive.Volumes)
{
MessageBox.Show(vol.IsMultiVolume + " \n"+ vol.IsFirstVolume+"\n"+ vol.IsSolidArchive);
}
}
But I cannot get the volume full file name. I then use SevenZipSharp v 0.64 and 7z.dll version 19, here is my code:
using (var extractor = new SevenZipExtractor("D:/Ontology tool.part1.rar"))
{
MessageBox.Show(extractor.VolumeFileNames[0]+"");
}
But then I get the error:
Invalid archive open/read error! Is it encrypted and a wrong password was provided? If your archive is an exotic one, it is possible that SevenZipSharp has no signature for its format and thus decided it is TAR by mistake
Note that the WinRAR program seems it make changes of RAR file formats because I create a RAR file with version 5.71 and when I try to open it with old WinRAR version it not opened ok, I mean files are not in the correct format.
The same applies to SevenZipSharp. If I open an old RAR file I created since 2014 it opens ok, but when I open a RAR file created with WinRAR v 5.71 it raises this error.
So now how can I get all parts files names of multi part RAR file?
Thanks for your help.
I end up using winrar.exe , send command to test file like this: