如何补偿文件名中不完整的日期

如何补偿文件名中不完整的日期

本文介绍了如何补偿文件名中不完整的日期/时间信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因,我得到

当我运行标准的exiftool "-alldates<$filename命令时.我已经踢完了,我最好的猜测是,它与文件名中的日期格式有关.

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.

我有以YYYY_MM_DD_?格式命名的文件,但我没有...完全确定?应该是什么.有时是一个字符,有时是两个字符(非常感谢,导出工具).

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?

谢谢.

推荐答案

要从文件名复制时间戳,必须至少包含14个数字才能覆盖日期(YYYYMMDD)和时间(HHmmSS)在这种情况下.执行此操作时,Exiftool对数字的位置并不挑剔,但必须为14.如果您实际上不知道时间,则可以执行"-alldates<$filename 000000之类的操作来添加00:00 :00时间到时间戳.有关从文件名复制日期的更多详细信息,请参见 exiftool常见问题解答#5 .

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.

这篇关于如何补偿文件名中不完整的日期/时间信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 06:28