Photorec Stage 2

Photorec Stage 2

PhotoRec is a WONDERFUL software that can save your life in case of disk failure.

Unfortunately, files recovered has a cryptic name like recup_dir.x/fXXXXXXX.zzz. The first goal of Photorec Stage 2 was to analyze .zip files to determine if it's a Microsoft Open XML file or if it's an Open Document one. It has evolved to support more formats.

It'll copy recovered files with a more human readable names.

Supported formats :

  • Microsoft Open XML (docx, xslx, pptx)
  • Open Document (odt, ods, odp)
  • MP3
  • JPG

For most of formats, it tries to determines (thanks to metadata) creation date and copy it to the right directory (ie multimedia/XXX/year/month), because most of the time we sort files using albums.

With MP3 files, it can find names using ID3 metadata (artist, album, track number, name).

The script is written in Python, you should install eyed3 and exifread packages (pip install eyed3) to access jpg and mp3 metadata. It's under GNU GPL Licence.

usage: [-h] --in IN_DIR --out OUT_DIR
                           [--max-files-per-temp MAX_FILES_PER_TEMP]
                           [--skip-ext SKIP_EXT] [--only-ext ONLY_EXT]
                           [--min-size MIN_SIZE] [--verbose] [--quiet]

Photorec post script analysis: try to recover filename with metadata
(supported files : docx,xslx,pptx,odt,ods,odp,mp3,jpg).

optional arguments:
  -h, --help            show this help message and exit
  --in IN_DIR           Directory in (with photorec results)
  --out OUT_DIR         Directory out (script results)
  --max-files-per-temp MAX_FILES_PER_TEMP
                        Maximum unknown files in temprorary directory, -1 for
                        no temp dir
  --skip-ext SKIP_EXT   Don't copy some extensions (comma separated eg :
  --only-ext ONLY_EXT   Copy some extensions (comma separated eg :
  --min-size MIN_SIZE   Minimum size for an extension (comma separated eg :
  --verbose             Verbose mode
  --quiet               Quiet mode

Command line example :

./ --in /home/me/photorec_out --out /media/me/pr_stage2/ --only-ext mp3,doc,zip,jpg --min-size jpg:300k,mp3:500

Development Team
Grégory Soutadé

Powered by InDefero,
a Céondo Ltd initiative.