Main Menu

Arg File and variable

Started by Quant007, January 28, 2020, 06:30:21 AM

Previous topic - Next topic

Quant007

Hello,
I would like to put a string from an inputline into a argfile like:
'Put the new date: ....... => store in %Date% and then give %Date% to a arg file

-DateTimeOriginal=%Date%
execute
-DateTimeOriginal>ModifyDate


I would like to do 2 Commands in one Arg-File. Is this possible?

Thanks for help

Phil Harvey

You can do two commands, but you forgot the dash on -execute.  Also, you'll probably need to use -common_args on the command line so the file names are applied to both commands.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Quant007

Thanks for your quick repley
I'm not quiet shure, if I understand right:
The commandline looks like
exiftool -@ argfile.arg%2020:01:21 16:06:00% -common_args [FileName]
and the argfile looks like
-DateTimeOriginal=%1%
-overwrite_original
-execute
-DateTimeOriginal>ModifyDate
-DateTimeOriginal>CreateDate
-XMP:HistoryWhen=
-overwrite_original

Is this right?
Thanks

Phil Harvey

That is correct, except the %1% won't work in an argfile.

Here is one way to do this:

exiftool -datetimeoriginal="2020:01:21 16:06:00" -@ argfile.arg -common_args FILE

-overwrite_original
-execute
-DateTimeOriginal>ModifyDate
-DateTimeOriginal>CreateDate
-XMP:HistoryWhen=
-overwrite_original
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).