【问题标题】:Format the ExifTool output of a filename list from an -if statement从 -if 语句格式化文件名列表的 ExifTool 输出
【发布时间】:2021-11-07 09:28:01
【问题描述】:

我正在运行此命令以显示 -Orientation 标记中包含的值为“rotate”的文件列表:

exiftool -if "$orientation =~ /rotate/i" -orientation *.jpg

我得到的输出是一个类似的列表:

======== 08.08.20 WYC Races-232.jpg
Orientation                     : Rotate 270 CW
======== 08.08.20 WYC Races-247.jpg
Orientation                     : Rotate 270 CW
======== 08.08.20 WYC Races-268.jpg
Orientation                     : Rotate 270 CW
  135 files failed condition
   45 image files read

我想要的输出只是一个文件名列表:

08.08.20 WYC Races-232.jpg
08.08.20 WYC Races-247.jpg
08.08.20 WYC Races-268.jpg

我知道我可以将输出通过管道传输到“FIND /I”======= 以仅选择文件名行,但我更愿意修改 ExifTool 的输出以仅列出文件名。

这可能吗?

谢谢!

水手男

【问题讨论】:

    标签: output filenames exiftool


    【解决方案1】:

    如果您的意思是您只想列出在其 “orientation” 标签中包含不区分大小写的“Rotate”的文件:

    exiftool -p '$filename' -if '$orientation =~ /Rotate/i' *jpg 2> /dev/null
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-29
      • 2013-12-11
      • 2021-09-20
      • 1970-01-01
      相关资源
      最近更新 更多