Page 1 of 1

DOS batch file or something else?

Posted: 16 Aug 2021 04:15
by AskingTroll
I want to write a utility to go through all the files in a folder (recursively) and use exiftool to extract the rating, then do different operations for different ratings.

There’s always two files with the same name and different extension (I shoot JPG and RAW) so for 0 stars, I delete both, 1-3 stars I delete just the RAW, and 4 and 5 I do nothing.

I’m no good at DOS.

Re: DOS batch file or something else?

Posted: 17 Aug 2021 09:43
by Compo
You need to provide more details, including, but not limited to:
  1. Are we to assume that there will only ever be files with the .RAW and .JPG extensions in that directory?
  2. Will there ever be files with a .RAW or .JPG extension which does not have a matching extension of the other type?
    You are after all stating that this procedure should delete one file only in a certain scenario, so an assumption could be made at least that some .JPG files could exist there without a matching .RAW file.
  3. Do both of the files always independently have ratings assigned?
    • If so, will both of their ratings always be the same? If not which rating will be used? the highest, the lowest, the one allocated to the .RAW file, or the one allocated to the .JPG file.
    • If not which one will be assigned a rating? the .RAW file, the .JPG file, or either one of those.

Re: DOS batch file or something else?

Posted: 18 Aug 2021 04:43
by npocmaka_
Check this
https://github.com/npocmaka/batch.scrip ... ipInfo.bat

With passing the number for the rating you can get the rating