Recursive (-r) "if" operation not working

Started by José Oliver-Didier, January 31, 2018, 02:06:23 PM

Previous topic - Next topic

José Oliver-Didier

Hello,

I am trying to perform a "Find and Replace" operation using exiftool in all files and folders. However, the -r (recursive) function does not seem to be working, as it is not including the contents of the subfolders - only the files contain in the current folder. What am I doing wrong here?

exiftool -if "$Sub-Location eq 'Someplace'" *.jpg -Sub-location="Shomewhere else" -L -r
blog: http://jmoliver.wordpress.com
flickr:  http://flickr.com/jmoliver

StarGeek

Wildcards don't work with the recurse option. You have to provide a directory path.  You use the dot . to indicate the current directory and the -ext option to limit the files to just jpgs.

Try this
exiftool -if "$Sub-Location eq 'Someplace'" -Sub-location="Shomewhere else" -L -r -ext jpg .
* 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).

Phil Harvey

It should make sense if you think about it:  You have told ExifTool to recurse into directories, but you haven't specified any directories on the command line.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

José Oliver-Didier

blog: http://jmoliver.wordpress.com
flickr:  http://flickr.com/jmoliver