简体   繁体   English

使用Exiftool创建没有SourceFile的数组

[英]Create Array without SourceFile using Exiftool

I would like to use Exiftool to create an array of -Artists for all files in a directory. 我想用Exiftool创建数组-Artists为目录中的所有文件。 Using the exiftool command below works but the output is not desirable: 使用下面的exiftool命令可以工作,但不希望输出:

C:\exiftool.exe -Artist Dir

The output looks something like this: 输出看起来像这样:

======== E:/File1.jpg
Artist                          : user1
======== E:/File2.jpg
Artist                          : user2
    1 directories scanned
    2 image files read

I would like the output to look something like this: 我希望输出看起来像这样:

user1_user2

Or at least a simple array or output like: 或至少是一个简单的数组或输出,例如:

user1
user2

To expand upon the answer I posted in the exiftool forums : 为了扩展我在exiftool论坛上发布的答案:
exiftool -q -s3 -Artist DIR

This will output each Artist tag on a line by itself, like your second example. 就像您的第二个示例一样,这将Artist在一行上输出每个Artist标签。

-q - Suppresses normal informational messages. -q禁止显示正常的信息性消息。 This will suppress the file name listings. 这将禁止显示文件名列表。
-s3 - Short output format. -s3简短的输出格式。 In this case, the addition of 3 to the option only prints the values of the tag. 在这种情况下,选项中加3只会打印标签的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM