Skipping files with no EXIF data, etc.

Started by elvis, July 30, 2017, 03:28:12 PM

Previous topic - Next topic

elvis

Thanks, Phil, for this impressive (and a little intimidating) tool. I appreciate everyone's thoughtful and accurate responses on this forum. I've learned a lot reading others' questions.  :)

1. I can't figure out how to skip files with no EXIF data in the source. I think I'm missing something obvious.

2. I want to create an appropriate side car (XMP, or whatever is considered best) files for source files that can't have EXIF data added to the file. .MPG specifically. I'm stumped on this, too. I would like to use the filename as the Date/Time Created in the sidecar.

3. I've figured out how to output -T to tab file, but I want to output multiple dates. For simplicity, assume I'm using -alldates. Does it keep each date aligned? For example if one date is missing in the source file, does that files data shift left because one date is missing? I might be messing up how I'm opening the resulting file in Excel.

4. The output dates use : colons between year/mo/da. I'd rather use a / slash so that Excel will import the date and time in one column. I have a work around, but I feel certain I'm missing something in the documentation on formatting the output date.

Phil Harvey

Quote from: elvis on July 30, 2017, 03:28:12 PM
1. I can't figure out how to skip files with no EXIF data in the source. I think I'm missing something obvious.

There are 2 ways to do this:

a. If you create the sidecar only from EXIF, then it won't be created if there is no EXIF (ie. "-xmp:all<exif:all" -w xmp)

b. Use a -if condition to only process files with EXIF: (ie. -if "$exif:all")

Quote2. I want to create an appropriate side car (XMP, or whatever is considered best) files for source files that can't have EXIF data added to the file. .MPG specifically. I'm stumped on this, too. I would like to use the filename as the Date/Time Created in the sidecar.

Something like this could work:

exiftool "-xmp:all<all" "-xmp:createdate<filemodifydate" -if "$exif:all" -ext mpg -w xmp DIR

Add more -ext options for all of the file types you want to process.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).