-1

Possible Duplicate:
How do I recover lost/inaccessible data from my storage device?

I accidentally deleted all files from one of my hard drives. I have recovered most of the files, but there is around 1 TB of data. I mainly want to recover my pictures, but they are mixed with thousands of other random/damaged files/photos.

Is there software which can scan all "good" photos and make a new folder containing them? Or a script that I can run to do this?

I am using Windows 7.

Journeyman Geek
  • 129,178
Napster
  • 222
  • 1
    Open to any OS? If so, a script can be built pretty easily using find . -name *.jpg then piped through imagemagick's "identify" command. If you're open to Linux/Unix tools I'll find my old script to filter out bad images. – nerdwaller Jan 13 '13 at 00:18

1 Answers1

1

Found my old script that incorporated a function like what you're looking for. This is using Bash and Imagemagick (on Linux):

#!/bin/env bash
 for img in `find /loc/of/saved/items -type f -iname "*.jpg"`; do
    if identify "${img}" &> /dev/null; then
        mv ${img} /identified/files
    fi
done
nerdwaller
  • 17,384
  • 2
    Pet peave replace #!/bin/bash with #!/bin/env bash. Does the same if there is a bash in /usr/bin, but also works if it is elsewhere (e.g. when the bash in /usr/local/bin/ and the default is sh, dash or just about anything) – Hennes Jan 13 '13 at 00:35
  • 1
    Learn something new everyday, thanks! I was wondering why I had seen that with python. – nerdwaller Jan 13 '13 at 00:41
  • If replaces the maintenance of scripts with dozens of interpreters with the maintenance of a single program. Quite nice if you need to take care of more than a few systems with different operating systems. (and thus the interpreters in various places). – Hennes Jan 13 '13 at 00:50