ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Rene on January 09, 2022, 04:49:58 AM

Title: Max length of parameter
Post by: Rene on January 09, 2022, 04:49:58 AM
Good Morning,

What is the max length of a parameter?

For renaming files mainly I use
exiftool -q -q -progress -P -api largefilesupport=1 "-Filename<${CreateDate}__%lf.%le" -d "%Y-%m-%d_%H-%M-%S" *.arw *.cr2 *.dng *.jpg *.mp4 *.avi *.mov
which is a very general command line. The big disadvantage of this command line is that it works for the whole directory and not selected files.

Before continuing I have to tell that I run EXIFTOOL as a shortcut in my file manager Speedcommander. To select only specific files I have created a command line which considers only selected files (by the SC parameter $(ActSel)). EXIFTOOL works fine with this shortcut.
exiftool -q -q -progress -P -api largefilesupport=1 "-Filename<${CreateDate}__%lf.%le" -d "%Y-%m-%d_%H-%M-%S" $(ActSel)

But If I select a lot files, sometimes EXIFTOOL does not run the command due to too long parameters. "$(ActSel)" in SC is a placeholder for the whole pathes of the files (e.g. %USERPROFILE%\Pictures\FILE_1.EXT; %USERPROFILE%\Pictures\FILE_2.EXT; %USERPROFILE%\Pictures\FILE_n.EXT).

I have also the possibility to create in Speedcommander a virtual list of files (ANSI, UTF8, UTF16) and provide it as a parameter. Unfortunately EXIFTOOL does not work with a list of files.

Does someone has a hint how I can run EXIFTOOL without this limitation for selected files and would provide it?
Title: Re: Max length of parameter
Post by: Phil Harvey on January 09, 2022, 08:19:58 AM
This is a limitation of your command shell.  Either choose a shell with longer command-line ability, or use the ExifTool -@ option to pass arguments to exiftool through a file.

- Phil
Title: Re: Max length of parameter
Post by: StarGeek on January 09, 2022, 11:26:17 AM
Windows has a command line max length of about 8,000 characters.