Recover only Java source code in photorec
Andrew Mclaughlin
I would like to recover only Java source code and XML files in photorec, but they are not listed on the list in the File Opt. There is Java class, but I'm not looking for files with .class extension and there is nothing similar to XML. If I select everything on the list, then I get java and XML files but with all other files, which I don't need. How can I specify in photorec that it should look only for .java and .xml files?
1 Answer
Both, .java, and .html files are plain text files which will be recovered as such. Because PhotorRec only recovers file content but not file names (or extensions) we can not further narrow the recovery down.
It would be possible to add a custom file type to the recoverable files from PhotoRec which then will be given an approptiate extension on recovery but this needs files with a special signature (which usually is not the case for plain text files). Only if your source files had an own unique signature you may be able to do so.
Depending if your broken drive still allows this you may get better results in recovering files or directories from TestDisk because then filenames will be recovered too.
1