How to exclude some files to be recovered?

Using PhotoRec to recover lost data
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
kode
Posts: 1
Joined: 18 May 2012, 12:05

How to exclude some files to be recovered?

#1 Post by kode »

I've got the USB 500Gb HDD which file system were destroyed by software failure during FAT32 -> NTFS conversation. I've run photorec_win with "File Opt" checked for JPG/MPG/RIFF only. Another "File Opt"s are turned off. Many JPGs/AVIs were successfully restored until photorec_win has found some HUGE and never existant DB file (more than 90 GB of my free space). Photorec_win is trying to recover this file and stops due to lack of free space. How to exclude this DB file or files greater than some size from recovery?
User avatar
remy
Posts: 456
Joined: 25 Mar 2012, 10:21
Location: Strasbourg, France.
Contact:

Re: How to exclude some files to be recovered?

#2 Post by remy »

Impossible, but feature has been discussed with Christophe Grenier few weeks ago. Perhaps in next beta ?

Way to manage is : "stop" the recovery (but let open the message asking to confirm) and move the files already recovered to another hard disk. You may also supress the db file whose file is growin' and growin'. Then go on with the recovery saying "No" to the question "Are you sure you want to stop"... Just be carefull to keep the recover_dir.* and at least the first and the last.
thge
Posts: 3
Joined: 27 May 2013, 21:22

Re: How to exclude some files to be recovered?

#3 Post by thge »

I'm having a similar issue with an MS Office file. When it asks me to select a disk with enough free space, it'll start again at the same sector as before, so I'm not able to skip it :/
Is it at least possible to exclude certain filetypes which are include in "doc" group (ín my case a *.ppt seems to be a false positive causing the issue, but I'm actually only interested in *.xls)
aacg2014
Posts: 2
Joined: 07 Apr 2014, 21:38

Re: How to exclude some files to be recovered?

#4 Post by aacg2014 »

If I understand correctly, it is still not possible to exclude specific files specified in the 'doc' extension?
In the second post in this tread I get the idea that it might be possible in the future?
The source, file_doc.c, looks quite advanced compared to a regular file header search but would it be possible to edit the file to turn off extensions that way. If yes, what would be the best way of doing this?

One other way to solve this is to write a script that deletes recovered files that are to big and/or files with a extension that is not of interest.

Thanks
User avatar
cgrenier
Site Admin
Posts: 5438
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: How to exclude some files to be recovered?

#5 Post by cgrenier »

doc/xls/ppt/... are using the same file format. Sometimes the whole file need to be recovered before the correct extension is determined by PhotoRec.

If you really want to reject files bigger than a certain size (ie 200 MB), replace

Code: Select all

.max_filesize=PHOTOREC_MAX_FILE_SIZE,
by

Code: Select all

.max_filesize=200*1024*1024,
in src/file_doc.c and recompile (./configure && make)
aacg2014
Posts: 2
Joined: 07 Apr 2014, 21:38

Re: How to exclude some files to be recovered?

#6 Post by aacg2014 »

Thank you,

I was thinking that during determination of the file maybe we can add a line to all other extensions than the one we are looking for., resulting in dropping the file rather than saving it? Would this work?

Thanks
Locked