Click here to Skip to main content
15,905,963 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am able to read raw data of the corrupted file system of USB drive. Is there any simple way for me to recover only text and docx files by using these Hexadecimal value? (Programming Language: C++)
Posted
Updated 13-Apr-15 4:13am
v3
Comments
Sergey Alexandrovich Kryukov 13-Apr-15 10:07am    
The question makes no sense, especially about "hexadecimal value". You should rather think at it with your own brain, it should be enough. And no corruption recovery is easy.
—SA
Member 11578225 13-Apr-15 10:11am    
Indeed it is my bad. would you mind share a little bit information that you know about the recovery process?
Sergey Alexandrovich Kryukov 13-Apr-15 10:17am    
I know that recovery process is based on internal knowledge of file system, not on file API, and that recovery software is expensive (some is freeware, but I never found anything open-source so far). And of course, recovery is not always possible, because some lost data could be already overwritten or deleted data is messed up too much. In all cases, restoration can be very complicated.
If you just deleted a file and did not do anything, it would be pretty likely to restore it, but who knows what can happen in file system is corrupted?
—SA

Not really - it's a complicated process, and the only time I've ever done it was in the floppy disk days - and it took about an hour per megabyte to restore after the FAT died. The problem is worse with flash drives, because they don't overwrite used blocks - instead they write to a new block and put the old one of a deletable list internally (because they wear out the more you write to them) - so you end up with multiple blocks that look very, very similar, so you have to work out exactly which version is the one you need for each block. If you are lucky, you can get away with working from the "end backwards" as until the flash is full the early blocks aren't recycled.

What I would do is start with solthing like Recuva[^] - I've had some good sucess with it in the past, and it's free!
 
Share this answer
 
Another solution a little bit complicate, but functional, is to create a virtual machine with MS-DOS or FREEDOS, attach your disk as an emulated local hard disk.
Then you can use any restore/repair tool for DOS :-)
 
Share this answer
 
v2
First of all you will need to parse the file system (i assume it's fat32 from the tags). In fact you will need to parse File Allocation Table (if it's corrupted and mirror copy of FAT was enabled on your drive, then you can try with it).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900