Main Menu

ARGSfile call another ARGSfile

Started by MariaR, January 08, 2018, 02:49:17 AM

Previous topic - Next topic

MariaR

Hello everybody, please help me

Is it possible to start from a .args-file after execution another an other .args-file?
My problem is: I must fill a tag and then I must use this tag to rename the file.
Simplyfied like this:

#argfile1.args

   -ImageUniqueID = 12345
   #...call argfile2.args


#argfile1.args

   -filename<${ImageUniqueID;}_%f.%e


And is it possible to do this in one line?

Thanks for your help
Maria

StarGeek

Yes, you can call multiple arg files, either in line or from each other.  But the thing to remember is that an arg file doesn't get executed automatically.  It's treated as if its contents appeared on the command line where it is called.

Instead, you can just call -execute directly from the command line.  You do need to add the -common_args option to pass data that is common to both commands, such as the filename

For example
exiftool -ImageUniqueID=12345 -execute -filename<${ImageUniqueID;}_%f.%e -common_args FileOrDir

Or putting both commands in a single arg file
#argfile1.args
-ImageUniqueID=12345
-execute
-filename<${ImageUniqueID;}_%f.%e


And then calling
exiftool -@ argfile1.args -common_args FileOrDir

Make sure and test first, though, it's late, I'm sleepy and might have made a mistake in what I typed.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

MariaR

It works perfect
Problem solved
Thank you