I am actually trying to extract a Fat Disk Image with DiskUtils but I am not getting the correct file names...
I get "\TURNER~3\TOPPER~1.P~1" in place of "\TURNEROVER\TOPPERSHEATH.PPTX"
FatFileSystem FatImg = new FatFileSystem(MS); //MS = Fat Image MemoryStream
foreach(DiscDirectoryInfo Di in FatImg.Root.GetDirectories())
{
foreach(DiscFileInfo Fi in Di.GetFiles())
{
Stream St = Fi.OpenRead(); // Correct Stream
string FName = Fi.Name; //Wrong Name
}
}
This is because DiscUtils does not support LFN [Long File Names]...
So I am looking for a perfect library to extract these files befor i try to make one myself...
Is there any way I can Extract it [maybe by DiscUtils] without FileName Errors...
Here is some modifications that you can add to
DiscUtils
to supportFAT LFN
s:First, make these changes to the
Fat\Directory.cs
file, like this (you need to add the_lfns
variable, theGetLfnChunk
function, and modify the existingLoadEntries
function to add the lines marked with//+++
below):Second, add these two public functions to the
Fat\FatFileSystem.cs
file. They will be the new APIs to query on LFNs:And that's it. Now, youll be able to dump a whole FAT disk recursively like this, for example:
Use at your own risks! :)