What to look for to determine if the file was actually from a camera

Started by grog808, January 23, 2014, 02:26:07 PM

Previous topic - Next topic

grog808

Yes... I am a newbie...  I'm helping a friend try to recover her pics from a crashed hard drive (very crashed...)  Used Photorec and it found a ton of pics.  Most are probably cached stuff from web browsing.  She wants the pics that she took with her digital camera, iphone, etc. 

I'm trying to use ExifTool from a Perl script to discern what is a real photo.  I'm open to going the other way also... Maybe to look for what is NOT a photo (from her cam).  Modifying some examples I found online, i'm able to obtain Exif info from every file.  I'm suspecting that the junk from her web cache are the ones that just have the pixel dimensions and that's it.  Some files have what you would expect... lens info, did the flash fire, make of the camera, etc.

As a first pass, I just want to separate her pics from the cache.  Maybe moving them to a different directory., since I'm suspecting the vast majority is cache junk.

I thought I would try searching to see if "Make" was present, but apparently, I don't know how to tell.  Any Perl scripting wizards that could shed some light?

StarGeek

You don't need to make a perl script to separate out photos, ExifTool can do this by itself.  For example, to move any photo that has a Make tag

ExifTool -if "defined $Make" "-directory</path/to/new/directory/" <DIR>

You didn't mention the system you're using, so change double quotes into singles if on mac or linux.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

grog808

Thanks StarGeek!  I have a problem diving in too deep!  I just was browsing some of the other posts and was going to test something like that!

grog808

I know i'm close...  I get the following on my testing...

Warning: No writeable tags set from /home/steve/Pictures/DSCN0733.JPG  (this file is actually the only one that has Make = Nikon)
    1 directories scanned
    2 files failed condition
    0 image files updated
    1 image files unchanged

there's 7 files in that Pictures directory, only 2 are jpeg.  The other jpeg file has no "Make" tag when queried by exiftool by itself.

StarGeek

What is the exact command you used?  Looks like you're not on a windows system, so did you single quotes instead of double quotes?
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

grog808

i'm on ubuntu...

exiftool -if 'defined $Make' '-directory</media/BigBoy/pass1-sorted/good' /media/BigBoy/pass1-sorted/test/

slightly different now... i'm at home using a copy of files from the actual bad drive.

StarGeek

Oops, my mistake.  Change the "<" into an equals sign.  You use "<" if you're using a tag name, "=" if just setting it to a value.  That's why you get "No writeable tags set from /home/steve/Pictures/DSCN0733.JPG".  It's trying to use "/home/steve/Pictures/DSCN0733.JPG" as a tag.

So, this command should work (I think ;))
exiftool -if 'defined $Make' '-directory=/media/BigBoy/pass1-sorted/good' /media/BigBoy/pass1-sorted/test/
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

grog808