在.bat文件中执行exiftool命令

时间:2018-09-27 00:28:59

标签: batch-file exiftool

我在这里找到了exiftool的以下命令行表达式:Extract thumbnail from jpeg file

exiftool -a -b -W %d%f_%t%-c.%s -preview:all YourFileOrDirectory

该命令在命令行上很好用,但是在以下批处理程序中运行时,似乎百分号被误解了,我不确定如何使它被接受。有人可以教我如何批量编写此命令。

This is the output:

::  This exif command will create a file in the same directory as the one
::  where the original photo is located that contains all the thumbnail
::  images contained in the file's exif data. The exact path to the original
::  must be specified in this command.
cd\  
exiftool -a -b -W %d%f_%t%-c.%s -preview:all c:\users\cher\pictures\one.jpg
pause 

1 个答案:

答案 0 :(得分:1)

请参见exiftool FAQ 27

在Windows .BAT文件中,“%”字符有意义,因此必须将ExifTool命令中的所有“%”字符都更改为“ %%”。