This topic is pretty close to what I'd like to do ... but not quite.
https://exiftool.org/forum/index.php?topic=10491.0 (https://exiftool.org/forum/index.php?topic=10491.0)
I'd like to dive deep into a series of folders with many many files (all without extensions) and get exiftool to add the missing extensions to everything it can identify. Bonus to rename the files in YYY-MM-DD-HHMMSS.extension if it is an image or video file. [not all files are images or videos... some are hidden .tar files etc.]
so far I've been using iterations of
exiftool -ext '*' -if '$FileType=~/JPEG/i' '-Directory<./%f.$FileTypeExtension' -r DIR/
exiftool -ext '*' -if '$FileType=~/MOV/i' '-Directory<./%f.$FileTypeExtension' -r DIR/
exiftool -ext '*' -if '$FileType=~/HEIC/i' '-Directory<./%f.$FileTypeExtension' -r DIR/
but considering the variety of files I'm dealing with, that might be a bit tedious.
thank you!
In that topic the the poster was looking for jpegs in particular. If you want exiftool to add extensions to anything it can identify, then just remove the -if statement. Also take note that I messed up the first attempts and it should be Filename as listed in the last post in that thread.
exiftool -ext '*' '-FileName<%f.$FileTypeExtension' -r DIR/
And here is your bonus command:
exiftool -ext '*' '-FileName<%f.$FileTypeExtension' '-FileName<${CreateDate;$self->GetValue("MIMEType")=~/image|video/ or undef $_}.$FileTypeExtension' -r -d %Y-%m-%d-%H%M%S%%-c DIR
- Phil
Thank you very much to both of you. :-) Now to let the 'pooter do the hard work of diving through all the files... :-)
thank you,