cgsecurity / testdisk

TestDisk & PhotoRec
https://www.cgsecurity.org/
GNU General Public License v2.0
1.58k stars 195 forks source link

Would you guys be interested in a photorec sorter script? #28

Open erikpopp opened 7 years ago

erikpopp commented 7 years ago

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?

wdlkmpx commented 7 years ago

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

erikpopp commented 7 years ago

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 notifications@github.com wrote:

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

noahbjohnson commented 5 years ago

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 commented 5 years ago

Ok, thanks for responding.

On Tue, 16 Apr 2019 17:50:20 +0000 (UTC) Noah B Johnson notifications@github.com 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.

cimballihw commented 4 years ago

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...