How To Write a python script to recover files from a formatted drive?

badanomaly picture badanomaly · Apr 26, 2014 · Viewed 7.9k times · Source

I want to write a python script using which I can recover files from a formatted drive. I know formatting doesn't delete the data on drive but marks that space available to overwrite. So how can I recover those files that have not been overwritten ?

Answer

aneroid picture aneroid · Apr 26, 2014

It's unlikely that such a script would work since the python functions and C library implementing file handling are meant to work on an intact File System. What you need to do to recover data is raw read from the disk itself. So perhaps your question should be about that.

Related python questions on stackoverflow: