How to compensate for incomplete date/time info in filename

℡╲_俬逩灬. 提交于 2019-12-11 11:51:48

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!