ABOUT
I regularly use PhotoRec to retrieve files from inaccessible file systems for customers, and to make sorting through the rescued files a bit easier I usually organized them by file type (.exe, .pdf, .doc. etc.)Normally I do this with Cygwin and the find command ( find ./ -name \*.pdf -exec mv -v {} ./PDF/ \; ) but I end up having to make directories for each file type extension and run the command once for each file type. I started to right a bash script to speed up the process then realized that AuoItv3 would be much more appropriate and put together this script + stand-alone executable.
Created with AutoIt v3.2.12.1
HOW IT WORKS
After PhotoRec does it’s thing you end up with a bunch of numbered folders prefixed with “recup_dir.” and each folder has different file types (unless you only chose to recovery one file type – in that case this utility is not much use to you).
PhotoRec Sorter (this script) is executed from the same directory as the “recup_dir” folders and moves each file into a new folder matching the name of the file extension (in upper case, ex. PDF, DOC, PPT)
So you end up with all the recovered files being sorted into folders by file extension.
USAGE
Platform: Windows (NT/2K/XP/VISTA) (9x Untested)
After downloading the latest version of PhotoRec Sorter…
- Move PhotoRec_Sorter.exe to the directory containing the “recup_dir” folders created by PhotoRec.
- Run PhotoRec_Sorter.exe and pay attention to the console output.
- Once PhotoRec Sorter has finished executing, be sure to look through the “recup_dir” folders for any files that did not get propery sorted.
DOWNLOAD
PhotoRec Sorter v 1.0.0.9 (Current)
CHANGELOG
Version 1.0.0.9
- Removes empty “recup_dir” folders after moving files.
Version 1.0.0.8 (Initial release)
- This release has gone through very limited testing, please comment or contact us if you have any appropriate feedback concerning this release.
- Must be executed from the directory containing the “recup_dir” folders created by PhotoRec.
- Moves files created by PhotoRec from “recup_dir” folders into folders by file extension.
- Leaves original “recup_dir” folders behind – will be cleaned up in upcoming version.
- Source .au3 file and compiled stand-alone executable are included in this release.
Other PhotoRec sorting Resources: http://www.cgsecurity.org/wiki/After_Using_PhotoRec
[...] Project Page: PhotoRec Sorter Comments RSS | Write Comment | Trackback No Comments [...]
Hi team
Any chance in future releases you could consider having a maximum file count per folder and therefor have multiple sub-folders per file type? For instance if photorec retrieves 60 000 jpg files PhotoRec Sorter could create a folder called jpg with a sub-folder called ‘1′ in which the first 2000 files are placed, then a second folder called ‘2′ is created to accept the next 2000 files and so on. I’ve found this helps speeds viewing significantly.
If the “recup_dir.1” folder (or possibly another) is empty, PhotoRec_Sorter.exe dies with a “file doesn’t exist” error. I was able to get around this by moving another recovered file into the “recup_dir.1”.
Other than that, it seems to work as advertised. Good work. It was a life-saver.
Thanks for the programm, works fine !!! dit you add the new file extensions from 6.11.3 ?
thanks Ed
Thank you! Actually the way the script works it generates the folder names from the files that exist in the “recup_dir” folders so there is no need to maintain a list of possible file extensions.
-Sam
I’m afraid, PhotoRecSorter doesn’t work properly.
It creates a lot of EMPTY folders but doesn’t move/sort ANY files from “recup_dir” folders created by PhotoRec. I don’t understand it… Do You have any sugestion for me, please?
My initial guess is that the script is having trouble accessing the files in order to move them.
Are the file permissions correct?
Is PhotoRec running while you run PhotoRec Sorter?
I’m adding logging to the to-do list to improve debugging issues like this.
Thanks for your feedback, Sam
I am having the same issue. Folders created, but files not moved. I am using Windows 7.
wow! this is just magic…all i did was run the sorter where the rec_dir folders are and voila! all the files are sorted…it seems like its a codebreaker though while it was running…lol….thank you guys!..
[...] рассортировать файлы по типам. Для этого пригодится PhotoRec Sorter (скачать). Запускаем PhotoRec_Sorter.exe в той папке, в которой [...]
[...] aber das kann so schlimm nicht mehr werden. Wem ähnliches widerfährt, dem empfehle ich Photorec, PhotoRec Sorter, Namexif und schließlich den guten alten TotalCommander – idealer Weise in dieser [...]