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 raw data? (Programming Language: C++)
It might be possible to do it, but it won't be simple.
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). Depending on corruption you it might be possible to extract some files. Read this article for more info about FAT32 structure and you can use this Microsoft specification as more strict guide. Good approach to understand the filesystem is to make some small usb or logical drive with sample file and parse it manually using some hex editor (free wxHexEditor
or proprietary WinHex
for example).
You can try to search sequences of ASCII
characters in your Hex image, but then you will need to sort them manually.
As for docx, this format internally is a collection of XML files and resources, compressed in zip. So it will be way to complicated task to restore it from raw hex image