问题
For some reason I'm getting
no writeable tags
when I run the standard exiftool "-alldates<$filename
command. I've kicked around and my best guess is that it has to do with the date format in the filename.
I've got files named with the format YYYY_MM_DD_?
where I'm not... entirely sure what that ?
is supposed to be. Sometimes it's one character, sometimes two (thanks a lot, export tool).
Am I on the right track? If so, how can I adjust my command to compensate? If not, can anyone diagnose the problem and provide a suggestion?
Thanks.
回答1:
In order to copy a time stamp from the filename, you must have at least 14 numbers in order to cover the date (YYYYMMDD) and the time (HHmmSS) in this case. Exiftool isn't picky when doing this operation about where the numbers are, but there needs to be 14. In cases where you don't actually know the time, you can do something like "-alldates<$filename 000000
in order to add a 00:00:00 time to the timestamp. See exiftool FAQ #5 for more details on copying dates from filename.
来源:https://stackoverflow.com/questions/57135800/how-to-compensate-for-incomplete-date-time-info-in-filename