I want to rename all my photos using the date and time but I think I may have some photos that have the extension messed up in the filename. Is there a way to rename the files like in the documentation examples but use something from the metadata to correct file extensions? If I am reading the documentation right .%%e uses the existing file extension correct?
For instance in the past I may have accidentally renamed files with no extension. Now I have no idea if the file is damaged or just won't open because of a missing extension.
exiftool "-FileName<CreateDate" -d "%Y%m%d_%H%M%S.%%e" DIR
Try
exiftool "-Filename<$CreateDate.$FileTypeExtension" -d "%Y%m%d_%H%M%S" DIR
This won't process files that don't have an extension but you can add -ext "*" to process them (see FAQ #16 (https://exiftool.org/faq.html#Q16)). I wouldn't suggest doing that for a directory that might have other file types that you don't want renamed.
I will try that command. What about -tagsfromfile? I was looking through the documentation and found that switch. Though I am not totally sure that is a switch.
From the docs on the -TagsFromFile option (https://exiftool.org/exiftool_pod.html#tagsFromFile-SRCFILE-or-FMT)
As a convenience, -tagsFromFile @ is assumed for any redirected tags which are specified without a prior -tagsFromFile option.
When you're copying one tag into another in the same file, then -TagsFromFile isn't needed.