Not all sub-directories processed

Started by glenbodie, September 11, 2016, 03:11:43 PM

Previous topic - Next topic

glenbodie

I'm trying to dump 3 tags from every file in a directory tree. Starting at the main directory there are over 900 subdirectories and each has about 20-30 JPGs in it. I entered:
-xmp:description -xmp:title -iptc:keywords -r -csv *.* > 3keys.csv
And the resulting CSV has only 1862 records and the topline says only SourceFile, Description and Keywords.
#1 - The Sourcefile column shows clearly that not all sub-directories were scanned (only 63 if my count is right) though it seems every file in those 63 was processed.
#2 - And where did the xmp:title go?

glenbodie

I fiddled more with the command line and I think I now have all the directories and the files in them and the title field also. Any advice on "improvements" to this set of arguments?
Note - these directories are downloads from Picasa online and that generates the .ini, .rss and.url files automatically.
The Picasa caption for each photo is in the .ini file, and I'm pulling them out and stuffing them into the XMP metadata.
So after reading these 3 fields, I'll massage them, programmatically do some edits based on the Picasa captions, and use the resulting CSV to update them all.

-m -xmp:description -xmp:title -iptc:keywords -ext "*" --ext ".ini"  --ext ".rss" --ext ".url" -r -csv DIR > 3keys.csv

StarGeek

One suggestion might be to use XMP:Subject instead of or maybe as well as IPTC:Keywords.  They're equivalent tags in the two tag groups.
* 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).

Phil Harvey

Quote from: glenbodie on September 11, 2016, 03:11:43 PM
#1 - The Sourcefile column shows clearly that not all sub-directories were scanned (only 63 if my count is right) though it seems every file in those 63 was processed.

See common mistake number 2 (specifically point 2c).

Quote#2 - And where did the xmp:title go?

The column will be dropped if none of the files contain this information.  See the -f option if you want to force missing tags to be returned anyway.

- 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 ($).

glenbodie

Quote from: StarGeek on September 11, 2016, 07:35:06 PM
One suggestion might be to use XMP:Subject instead of or maybe as well as IPTC:Keywords.  They're equivalent tags in the two tag groups.
I am importing these JPG into Flickr and, after some testing to find out which EXIF/XMP/IPTC fields affected which Flickr fields, I came up with the
-xmp:description -xmp:title -iptc:keywords
There may well be OTHER fields that can also affect what Flckr reads into its own database, but I know these 3 work for me.

Quote from: Phil Harvey on September 11, 2016, 07:51:02 PM
The column will be dropped if none of the files contain this information.  See the -f option if you want to force missing tags to be returned anyway.
Thanks Phil, the subset of directories that it processed that first time would all have had a blank Title so that explains it. The full 900+ folders DO have a few with data in the Title field.

Quote from: Phil Harvey on September 11, 2016, 07:51:02 PM
See common mistake number 2 (specifically point 2c).
So with that advice, and recalling that there are a few video files in there with various file extensions, I have revised my command line to:
-m -xmp:description -xmp:title -iptc:keywords -f -r -G -csv DIR1 > 3keys.csv

My objective is to dump these 3 fields for a full directly tree into a CSV; use data I have in Excel to modify many of those 3 fields; save the CSV and use ExifTool to write it all back using these parameters:
-m -r -G -o DIR2 -csv=3keys.csv DIR1 >3 keys_fix.txt

Does this sound like a reasonable plan? And advice on this?

glenbodie

Ooops, forget about the -G and the -f in the preceeding commands. Not helpful!

Phil Harvey

I would also add XMP:Subject as StarGeek suggested.  Video files do not support IPTC.

Also, make sure that "DIR2" ends with a slash unless the directory already exists.  (Otherwise ExifTool will assume it is a file name.)

- 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 ($).