Page 1 of 1

Restrict PhotoRec by filesize ?

Posted: 16 Jun 2012, 00:55
by hallstevenson
I'm using PhotoRec to recover files from a hard drive, mainly MP3 and JPEGs at this point. I'm doing one filetype at a time for now. With just MP3s, before I ran out of disk space (!!), it recovered over 250,000 MP3 files. I by no means have that many, but what it's done is recover many, many MP3 with filesizes of 300k, 500k, 1500k and so on. I don't know what those are or if they're "pieces" of MP3s. I understand I may not recover all but I'll take what I can get ! Those pieces are creating a nightmare though.

What I'd like to do is tell PhotoRec to recover MP3 filetypes but only over say 1mb in size. I see no options like this though. Is it possible ?

Re: Restrict PhotoRec by filesize ?

Posted: 16 Jun 2012, 15:22
by cgrenier
Actually it's only possible by modifying the source code itself and recompiling after that.
In src/file_mp3.c, modify the value listed at line 45:

Code: Select all

file_recovery_new->min_filesize=287;
For non-developer, the ability to custom a minimal size per file format is in my TODO list. The initial request has been done by remy.