4

We're recoverying bunches of data from a crashed partition of which we had no backup, using a data recovery software. Files are getting recovered, but file names are lost.

Is there any software or method we could use to automatically scan the file headers to try to determine its type (between the most common ones: image types, different kind of source code text files, compressed files, etc) and automatically put an extension on its random name, to help then processing the data?

Maybe this PHP function will help?

Thanks in advance.

An Dorfer
  • 1,178
Áxel Costas Pena
  • 930
  • 4
  • 13
  • 30
  • 4
    What OS are you using? Linux has the 'file' command which will identify the file type from the contents. You'd need to wrap a script around it to make it automagic, but that's not a big task... See http://linux.die.net/man/1/file for man page. – BobT Jan 07 '13 at 17:14
  • 1
    in addition to file, as @BobT said, you can also, on unix, read the original filenames (including their eventual extension, if any) from the (recovered) directory entries. The tricky part being to match file entry in a directory with a recovered file under another name... – Olivier Dulac Jan 07 '13 at 17:20
  • 1
    @BobT we don't depend on a particular OS to do this task, we can adapt. Your suggestion seems useful. – Áxel Costas Pena Jan 07 '13 at 17:39
  • @OlivierDulac, directory entries are unrecoverable, data recovery software is giving random names to files. Thanks anyway ;) – Áxel Costas Pena Jan 07 '13 at 17:40
  • 1
    Maybe you can recover the dir themselves (ie, the inode who contained a dir entry. That inode will, in turn, contain the former list of files+dirs "directly underneath it", and can be read by several means). The soft maybe rename those directories names too, but their content should still contain the former lists. – Olivier Dulac Jan 07 '13 at 23:32
  • Thank you @OlivierDulac, the recovery processo doesn't depend on me, but the further organisation. Anyway, I'll elevate your proposal. Lots of thanks. – Áxel Costas Pena Jan 08 '13 at 10:36
  • you are welcome. Good luck in retrieving the data! – Olivier Dulac Jan 08 '13 at 11:25

1 Answers1

3

You can use TrID for that. There are versions for both Windows and Linux. It can scan multiple files and with the "-ae" switch it can rename each one adding the guessed extension.

Disclaimer: I'm TrID's developer.

Mark0
  • 149