ExifTool Forum

ExifTool => Newbies => Topic started by: mmondry on December 22, 2016, 07:16:17 PM

Title: Command line for ratings...
Post by: mmondry on December 22, 2016, 07:16:17 PM
The docs are wonderful, but I cannot wrap my head around one thing.  I need to have the ratings of a list of photos I'm passing in a -@ xxx list, but what I get now is ten "0" for 30 jpg files.  If I turn off the "binary" mode, then I see that only 10 of the 30 jpgs have ratings, but the list I receive is "0000000000" so I don't know which zero corresponds to which file.  What command line parameter should I use to I get back 30 values please?

I'm using this currently...

-fast
-rating
-b
1xxx.jpg
2xxx.jpg
3xxx.jpg
...
-execute
Title: Re: Command line for ratings...
Post by: Hayo Baan on December 23, 2016, 03:27:14 AM
I don't fully understand what you want as output, but if you use -T instead of -b you get the rating for each file on a single line, files that do not have a rating get a -. But perhaps you also want to include the filename on each line? Simple add -filename.
Also, is there a particular reason you specify each file individually (and in an arguments file)? Why not make use of e.g. *.jpg or (better) -ext JPG? Your command could then look like this: exiftool -fast -T -rating -filename -ext JPG . which will produce a nice tab delimited list of ratings and filenames for all JPG files in the current directory.

Hope this helps :)
Title: Re: Command line for ratings...
Post by: Phil Harvey on December 23, 2016, 07:34:03 AM
I really don't think you should be using the -b option, but I am curious to know why you wanted it.

Hayo's suggestion is a good way to do this.

- Phil
Title: Re: Command line for ratings...
Post by: mmondry on December 23, 2016, 10:12:54 AM
To be honest; I assumed this was the most compact result format, before discovering the -csv option, which is exactly what I'm looking for.  The reason I can't specify a folder with wildcard is because a photo collection in our software may have images from many different folders, so the command-file option is, as far as I can see, the best option for me at this point.
Title: Re: Command line for ratings...
Post by: Phil Harvey on December 23, 2016, 12:32:49 PM
I see.  But note that the -csv option isn't suitable for processing a large number of files (many thousands).  If -T is suitable, it is more efficient.

- Phil
Title: Re: Command line for ratings...
Post by: mmondry on December 23, 2016, 03:50:39 PM
Well that's good to know.  One last question in that case; -T only seems to generate the filename part, but I need the entire path for each file that I supply in the command file.
Title: Re: Command line for ratings...
Post by: StarGeek on December 23, 2016, 05:40:02 PM
Quote from: mmondry on December 23, 2016, 03:50:39 PM
but I need the entire path for each file that I supply in the command file.

You can add -directory to you command, but you would still have to combine the path with the file.  Otherwise, you could use the user-defined tag that Hayo Baan created here (https://exiftool.org/forum/index.php/topic,5922.msg29137.html#msg29137).

See next post.
Title: Re: Command line for ratings...
Post by: Phil Harvey on December 23, 2016, 09:32:38 PM
Or you could use the FilePath tag, which is the full path of the file.

- Phil
Title: Re: Command line for ratings...
Post by: StarGeek on December 23, 2016, 10:12:35 PM
D'oh, yet again.  And it's been around for two years.

I missed it because it's only generated when asked for.
Title: Re: Command line for ratings...
Post by: mmondry on January 05, 2017, 03:28:35 AM
Yup, FilePath does the trick quite nicely, thanks!