what does the . do in this command?

Started by boombass, May 30, 2017, 02:48:44 PM

Previous topic - Next topic

boombass

exiftool '-datetimeoriginal<filemodifydate' -if '(not $datetimeoriginal or ($datetimeoriginal eq "0000:00:00 00:00:00")) and ($filetype eq "JPEG")' . <dir>

I found this command online somewhere. I understand what it does, but I don't know what the . at the end of the command does. It seems to work even if I omit it.

Can anyone help? Thanks!

StarGeek

The dot is the current directory.  It's not specific to exiftool, but part of the bash/shell/cmd that is in use. 
* 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).

boombass

Thanks! So it would be useful if I were navigating, in Terminal (on a Mac), to the folder with the files I wanted to use the command on. But since I am specifying the folder at the end of the command, I don't need it. Got it!

StarGeek

Yes, if you're specifying the target folder, you're better off removing it, as it will also process the current directory, which may give you unexpected results.

Additionally, I should have mentioned, there is also two dots .. which points to the parent directory of the current 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).