Many people know the free (Open Source) utility
PhotoRec , which allows you to recover files from different types of media, even if the file system of these media is seriously damaged or even formatted. On Habré there was already a
topic (author:
eeexception ) on how to use this utility to restore photos from a camera's memory card after formatting. This incident alone indicates that the utility is serious despite being free. And if you take into account the fact that the program is cross-platform - it simply does not have a price.

But there is one minus in this program. If you restore the contents of different types - from text documents to video files, and even in large quantities, then you will end up with a not very attractive picture. You will see the recovered files, mixed by type and with unknown names for you. Is it possible to at least fix something in this situation?
On the
official page of the project are several options that can facilitate restoring order after restoration.
Sort by extension
Happy users of Unix-platforms may not resort to the help of additional programs for sorting, as you can do with regular means for laying out files. For example, if you need to put all pdf-files in a separate folder called PDF, you can use a similar command:
find ./ -name \*.pdf -exec mv -v {} ./PDF/ \;
If you are a happy Windows user, you can also use the same command, only for this you need to install a Cygwin emulator. But you can use a special utility that is logically called the
PhotoRec Sorter . This program will scan the recovered files and decompose them into folders with a name that corresponds to the extension.
It is clear that this will not give as much as we would like, but this is already, after all, order. And what can be done with the file names? It is a pity that the return of these file names will not work, but something can still be done. Most often, you have to restore photos and music in large quantities, since within these files information can be stored that will allow you to sort files according to certain criteria.
')
Sort photos (JPEG)
There is a utility called
Exiv2 . With it, you can get information about the picture:
# exiv2 -ps 1.jpg
Filename: 1.jpg
Filesize: 1285238 Bytes
Camera make: FUJIFILM
Camera model: FinePix F601Z
Image timestamp: 2005:08:07 14:31:22
Image number:
Exposure time: 1/70 s
Aperture: F3.5
Exposure bias: 0
Flash: No, auto
Flash bias:
Focal length: 6.1 mm
Subject distance:
ISO speed: 200
Exposure mode: Auto
Metering mode: Matrix
Macro mode: Off
Image quality: NORMAL
Exif Resolution: 2736 x 1824
White balance: Auto
Thumbnail: JPEG, 9612 Bytes
Copyright:
Exif comment:
One of the important points for sorting from the above, is probably the date of the image. Therefore, you can rename photos based on this parameter:
# exiv2 -t rename *.jpg
Sort mp3 files
Programs that allow you to rename files, given the information in the tags enough. One of them is -
EasyTAG . Using it, you can use the information in the tags (if, of course, the tags were filled in) to rename the restored music collection.
Lastly
PhotoRec developers advise using OpenOffice to repair corrupted Microsoft Office files. Sometimes, to restore some office documents (for example, * .xls, * .ppt), you need to change the extension to .doc. To restore the PST files, it is recommended to use the
Scanpst utility.