exiftool change datetimeoriginal for files in subdirectories

Started by roniz, December 16, 2019, 04:00:29 PM

Previous topic - Next topic

roniz

I'm using exiftool to update the datetimeoriginal tag for all files in a directory.
The command I'm using is - exiftool -datetimeoriginal<filename *.* and it works just fine if all the files are located in the same directory.
When the files are located in a subdirectory tree I've tried to change the command to - exiftool -r -datetimeoriginal<filename .
The output was:
1 directories scanned
0 image files read

What am I missing?

Thx, Roni

StarGeek

Are you including the quotes?  Any tag copy command, the ones that include the Greater/Less Than symbol, must be enclosed in quotes to prevent the shell/CMD from treating it as a redirection.
exiftool -r "-datetimeoriginal<filename" .

As long as the current working directory is correct, then the above command should work.  The output listed indicates it only read the one directory.  As long as the -r (recurse) option was included then it should have gone into subdirectories. The fact that it didn't indicates to me that the current directory was not the correct one.

* 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).

roniz