解决“未设置可写标签"问题错误 [英] Troubleshooting "no writeable tags set" error

查看:203
本文介绍了解决“未设置可写标签"问题错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图(最终)修改一批文件,但是由于在运行批处理命令之前尝试修改单个文件,因此陷入了基础.

I'm trying to (ultimately) modify a batch of files but getting stuck in the basics as I try to modify a single file before running a batch command.

如果有人可以帮助我对输入的命令进行故障排除,那就太好了.我敢肯定这很简单.

If someone could help me troubleshoot the command I'm inputting, that would be fantastic. I'm sure it's something very simple.

非常感谢您可以提供的任何帮助!

Thanks a lot for any help you can provide!

以下是图像exif数据的缩写:

Here's the abbreviated image exif data:

-ExifToolVersion = 10.10

-ExifToolVersion=10.10

-FileName = 2018_11_13_1.jpeg

-FileName=2018_11_13_1.jpeg

-Directory =.

-Directory=.

-FileSize = 2.8 MB

-FileSize=2.8 MB

-FileModifyDate = 2019:07:12 15:40:38-07:00

-FileModifyDate=2019:07:12 15:40:38-07:00

-FileAccessDate = 2019:07:12 15:40:38-07:00

-FileAccessDate=2019:07:12 15:40:38-07:00

-FileInodeChangeDate = 2019:07:23 10:38:02-07:00

-FileInodeChangeDate=2019:07:23 10:38:02-07:00

-FilePermissions = rw-rw-r-

-FilePermissions=rw-rw-r--

-FileType = JPEG

-FileType=JPEG

-FileTypeExtension = jpg

-FileTypeExtension=jpg

-MIMEType = image/jpeg

-MIMEType=image/jpeg

[...]

-ModifyDate = 2018:11:13 12:00:53

-ModifyDate=2018:11:13 12:00:53

[...]

-DateTimeOriginal = 2018:11:13 12:00:53

-DateTimeOriginal=2018:11:13 12:00:53

-CreateDate = 2018:11:13 12:00:53

-CreateDate=2018:11:13 12:00:53

我当前的输入是:exiftool "-FileModifyDate<$filename00000" ./2018_11_13_1.jpeg

错误消息是:

警告:从2018_11_13_1.jpeg开始未设置可写标签

Warning: No writable tags set from 2018_11_13_1.jpeg

已更新0个图像文件

1个图像文件未更改

当然,exif数据是不变的.

And the exif data is, of course, unchanged.

我已经确认可以在该标签中写入一个值,因此从文件名中提取数据肯定存在问题.

I've confirmed that I can write a value to this tag, so there's definitely something going wrong in pulling from the filename.

(接续如何补偿不完整的日期/time info in filename )

推荐答案

此处的问题是,您正在尝试从名为filename00000的标记进行写入.如果您查看另一篇文章中的示例,您会发现Filename后有一个空格.这使它与众不同,以便exiftool知道哪个是标签名称,哪个是其他数据.

The problem here is that you are trying to write from a tag named filename00000. If you check the example in the other post, you will see that there is a space after Filename. This sets it apart so that exiftool knows which is a tag name and which is other data.

不过,这里可能还有其他问题.您的文件名有一个额外的数字,而不是日期.当exiftool尝试从文件名中写入时间戳时,其结尾将为"2018:11:13 10:00:00",如果最后一位达到3或更多信息,则时间戳为"2018:11:13 30:00:00".

There is possibly an additional problem here, though. Your filename has an extra number that is not the date. When exiftool tries to write the time stamp from the filename, it is going to end up with a value of "2018:11:13 10:00:00", which might become especially problematic if that last digit hits a value of 3 or more, resulting in a timestamp of "2018:11:13 30:00:00".

我建议使用exiftool的高级格式化功能(一种花哨的方式表示您可以在命令中使用perl代码)删除多余的数据.像
exiftool "-FileModifyDate<${filename;s/^(.*\d{4}_\d\d_\d\d).*/$1/} 000000" ./2018_11_13_1.jpeg

I would suggest using exiftool's Advanced Formatting Feature (a fancy way of saying that you can use perl code in the command) to strip the excess data. Something like
exiftool "-FileModifyDate<${filename;s/^(.*\d{4}_\d\d_\d\d).*/$1/} 000000" ./2018_11_13_1.jpeg

请注意,如果文件名采用任何其他格式,则需要使用其他命令.

Though take note, if the filenames are in any other format, then it would require a different command.

这篇关于解决“未设置可写标签"问题错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆