DOS batch file or something else?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
AskingTroll
Posts: 1
Joined: 16 Aug 2021 04:12

DOS batch file or something else?

#1 Post by AskingTroll » 16 Aug 2021 04:15

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.

Compo
Posts: 600
Joined: 21 Mar 2014 08:50

Re: DOS batch file or something else?

#2 Post by Compo » 17 Aug 2021 09:43

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.

npocmaka_
Posts: 516
Joined: 24 Jun 2013 17:10
Location: Bulgaria
Contact:

Re: DOS batch file or something else?

#3 Post by npocmaka_ » 18 Aug 2021 04:43

Check this
https://github.com/npocmaka/batch.scrip ... ipInfo.bat

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

Post Reply