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.
DOS batch file or something else?
Moderator: DosItHelp
Re: DOS batch file or something else?
You need to provide more details, including, but not limited to:
- Are we to assume that there will only ever be files with the .RAW and .JPG extensions in that directory?
- 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. - 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?
Check this
https://github.com/npocmaka/batch.scrip ... ipInfo.bat
With passing the number for the rating you can get the rating
https://github.com/npocmaka/batch.scrip ... ipInfo.bat
With passing the number for the rating you can get the rating