by squarefoot · 4y ago · 0 comments
https://www.cgsecurity.org/wiki/TestDisk
edit: oh, I just read that you mentioned TestDisk. Yes, it can recover the directory structure, at least it did in my case. After using it you will likely see that some files have been duplicated with a suffix added, like document.doc and document.doc.xyz (can't recall the exact suffix) in the same directory. In that case you need to check which file has been fully recovered, and rename it if needed.
You'll do much better with purpose-build Windows undelete utilities. I've had good luck with freeundelete:
Photorec is about files only.
They are both vey good at what they are supposed to do, but in your case Testdisk is not suited and Photorec represents a last attempt as recovered files are carved, basically you will lose not only directory structures, but also filenames and metadata.
A good GUI tool (not of the "one click" type, it needs some learning to use it) is DMDE: