ExifTool Forum

ExifTool => Newbies => Topic started by: Quant007 on January 28, 2020, 06:30:21 AM

Title: Arg File and variable
Post by: Quant007 on January 28, 2020, 06:30:21 AM
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
Title: Re: Arg File and variable
Post by: Phil Harvey on January 28, 2020, 07:04:30 AM
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
Title: Re: Arg File and variable
Post by: Quant007 on January 28, 2020, 07:29:06 AM
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
Title: Re: Arg File and variable
Post by: Phil Harvey on January 28, 2020, 07:49:23 AM
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