00 Votes

Windows: Maximum Parameter Length for Command Prompt or Batch-Script

Question by Guest | 2014-08-25 at 13:30

Is there any character limitation for the length of the parameters used at the Windows command line interpreter (CMD.EXE) or for batch files?

Or is it possible to use and pass parameters of any length via the command prompt or a batch script to programs and applications?

ReplyPositiveNegative
0Best Answer2 Votes

At the Windows command prompt as well as in batch files, there is a limitation of 8191 characters since Windows XP and newer Windows versions. Older operating systems such as Windows 2000 or Windows NT 4.0 have a restriction of 2047 characters.

This constraint always refers to the total length of the command. This means, that all parameters including blanks and the name of the program should not exceed this length. For example, when using the command "prog.exe /p1 /p2 C:/dat.txt", that are 27 used characters.
2014-08-26 at 08:40

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.