Author Topic: Arg File and Options  (Read 263 times)

Quant007

  • Jr. Member
  • **
  • Posts: 24
Arg File and Options
« on: January 28, 2020, 06:22:47 AM »
Hello,
I would like to put the command
exiftool "-FileName<CreateDate" -d %Y-%m-%d_%H-%M-%S%%-c.%%e [FileName] into a Arg-File.
I tried this

-FileName<CreateDate
-d
%Y-%m-%d_%H-%M-%S%%-c.%%e


How can I do this?

Also I would like to put the option -api largefilesupport=1 and the option #-charset filename=latin in my Arg-File.
What I tried is:

-charset filename=latin
-api
largefilesupport=1

Both toggles doesnt work.
Is there any help for me?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16687
    • ExifTool Home Page
Re: Arg File and Options
« Reply #1 on: January 28, 2020, 07:03:23 AM »
You have it exactly correct.  It should work as long as your argfile is plain UTF-8 text.

If you are still having troubles, attach your argfile and we'll take a look.

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

Quant007

  • Jr. Member
  • **
  • Posts: 24
Re: Arg File and Options
« Reply #2 on: January 28, 2020, 07:20:53 AM »
The Arg-File is UTF8. I get this error message

exiftool -@ rename.arg C:\temp\IMG_0760.jpg
Warning: Error opening file - argefilesupport=1
Error: File not found - argefilesupport=1
Warning: Error opening file - %Y-%m-%d_%H-%M-%S%%-c.%%e
Error: File not found - %Y-%m-%d_%H-%M-%S%%-c.%%e
Warning: New file name not allowed in Windows (contains ':') - C:/temp/IMG_0760.jpg
    0 image files updated
    3 files weren't updated due to errors

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3785
Re: Arg File and Options
« Reply #3 on: January 28, 2020, 10:25:23 AM »
Warning: Error opening file - argefilesupport=1
Error: File not found - argefilesupport=1

That error is obvious.  You dropped the leading L in LargeFileSupport.

The second problem is that your -d (dateFormat) option has a trailing space.  That makes exiftool display a tag "d " (includes the space).  Because -d is no longer an option, it treats the date string as a file name. Remove any trailing spaces, add the L and your file should work.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Quant007

  • Jr. Member
  • **
  • Posts: 24
Re: Arg File and Options
« Reply #4 on: January 29, 2020, 08:35:17 AM »
Thanks for the answer.
Sorry, my mistake, I missed that l.
I also not checked the space after "d".
I made the changes, renaming works now, but I still get an error message:
Warning: Error opening file - largefilesupport=1
Error: File not found - largefilesupport=1
    1 directories scanned
    0 image files updated
   22 image files unchanged
    1 files weren't updated due to errors

-api largefilesupport=1 is not interpreted correctly

Can anyone offer an explanation for this?

Translated with www.DeepL.com/Translator (free version)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16687
    • ExifTool Home Page
Re: Arg File and Options
« Reply #5 on: January 29, 2020, 08:42:56 AM »
If you are getting this message, then the previous line in the config file can not be exactly "-api" (without the quotes).  Try re-typing it.  Either that, or you are using a very old version of Exiftool.

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

Quant007

  • Jr. Member
  • **
  • Posts: 24
Re: Arg File and Options
« Reply #6 on: January 29, 2020, 09:40:37 AM »
I cant fix the error. I attached the file, can you have a look to this?
I use Exiftool 11.84

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16687
    • ExifTool Home Page
Re: Arg File and Options
« Reply #7 on: January 29, 2020, 09:50:29 AM »
Ah.  -p expects an argument, and this is eating the -api option.  I think you mean -P (capital "P").  But this option will have no effect if just renaming the file, so you might as well just remove it.

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