testdisk icon indicating copy to clipboard operation
testdisk copied to clipboard

Would you guys be interested in a photorec sorter script?

Open erikpopp opened this issue 8 years ago • 5 comments

Awhile ago, I used photorec to recover the files from someone's failing hard drive. He had some engineering program that created files with extensions I had never heard of before. photorec did a great job of recovering files, and I ended up with a folder that had hundreds of thousands of files in it. I found this annoying, since most of them were useless (.exe, .dll, etc.). If photorec recovered the files he needed, I wouldn't know. So I wrote a script that creates a folder for each file type that photorec recovers, and moves all files with that extension into that folder. It handles files with no extension by moving them into their own folder. I then gave him the external drive he had provided for me to put recovered files on and he was able to find what he needed at his leisure.

Would you guys like to include it with testdisk and photorec for systems that have bash available? If so, where in the source tree should I upload it?

erikpopp avatar Jul 05 '17 01:07 erikpopp

That script looks handy.. i'm interested.. could you post a link to the script?

wdlkmpx avatar Jul 11 '17 02:07 wdlkmpx

Here's a link to it on github: https://github.com/erikpopp/sort-photorec

On Tue, 11 Jul 2017 02:13:43 +0000 (UTC) wdlkmpx [email protected] wrote:

That script looks handy.. i'm interested.. could you post a link to the script?

erikpopp avatar Jul 11 '17 17:07 erikpopp

There are quite a few examples of these scripts on github... If someone wants to implement in cpp, that would be interesting. However, I don't think bash scripts have a place in this repo.

noahbjohnson avatar Apr 16 '19 17:04 noahbjohnson

Ok, thanks for responding.

On Tue, 16 Apr 2019 17:50:20 +0000 (UTC) Noah B Johnson [email protected] wrote:

There are quite a few examples of these scripts on github... If someone wants to implement in cpp, that would be interesting. However, I don't think bash scripts have a place in this repo.

erikpopp avatar Apr 27 '19 06:04 erikpopp

Hello guys. I used Photorec to recover personal data from a damaged hard disk. And I used a python script sorting the ouput, given in the link below: https://github.com/tfrdidi/sort-PhotorecRecoveredFiles However this script uses shutil.copy2 function, which supposedly copies metadata. But as Photorec uses files carving method, the metadata are lost... and when I try to run this script, it fails at some point because of a call to copystat... As a result it is better to replace copy2 by copy... which does not try to copy the metadata...

cimballihw avatar Aug 18 '20 18:08 cimballihw