Putting order after PhotoRec

    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. There was already a topic on Habr (author: eeexception ) on how to use this utility to restore photos from the camera’s memory card after formatting. This case alone indicates that the utility is serious despite its free download. And if we take into account the fact that the program is cross-platform - it simply does not have a price.
    image

    But there is one minus in this program. If you restore content of various types - from text documents to video files, and even in large quantities, then the result is not a very attractive picture. Before you appear restored files, mixed by type and with unknown names for you. Is there anything you can fix in this situation?

    The project’s official page provides several options that can facilitate restoring order after restoration.

    Sort by extension


    Happy users of Unix-based platforms may not have to resort to additional sorting programs, since you can get by with regular means for expanding files. For example, if you need to put all pdf files in a separate folder called PDF, then 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 the Cygwin emulator. But you can use a special utility, which logically is called PhotoRec Sorter . This program will scan the recovered files and put them in 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, after all, an order. But what can be done with the file names? It’s a pity that you won’t be able to return the real file names, but you can still do something. Most often you have to restore large quantities of photos and music, since inside these files information can be stored that will allow you to sort files by certain criteria.

    Sort photos (JPEG)


    There is a utility called Exiv2 . Using it you can get information about the picture: One of the important items for sorting from all of the above is probably the date of the picture. Therefore, you can rename photos based on this parameter:
    # exiv2 -p s 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:


    # exiv2 -t rename *.jpg

    Sort mp3 files


    Programs that allow you to rename files, given the information in the tags are enough. One of them is - EasyTAG . With it, you can use the information in the tags (if, of course, the tags were filled) to rename the restored music collection.

    Lastly


    PhotoRec developers advise using OpenOffice to repair damaged Microsoft Office files. Sometimes, to restore some office documents (for example, * .xls, * .ppt), you need to change the extensions to .doc. To restore .pst files, it is recommended to use the Scanpst utility .

    Also popular now: