Rename file if Software tag is populated

Started by slickdawg, August 25, 2021, 04:03:22 PM

Previous topic - Next topic

slickdawg


I'm trying to identify all .jpg files that have been "contaminated" by the Microsoft Photo viewer.  I don't want to add all of that tag to the filename, just add microsoft to the file name if the tag is populated.


Software                        : Microsoft Windows Photo Viewer 6.1.7600.16385

so IMG_0001.JPG would become IMG_0001_Microsoft.JPG

I was going to do this with grep and a bash script, but I think exiftool would be better.  Any suggestions? 

StarGeek

Try
exiftool -if "$Software=~/Microsoft Windows Photo Viewer/" -Filename=%f_Microsoft.%e /path/to/files/

Change the double quotes to single quotes if you're using Mac/Linux/Powershell.
* 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).

slickdawg


Thank you StarGeek!  That worked perfectly, unlike my trials.  :)