Article ID: 830473 - Last Review: February 1, 2007 - Revision: 1.3 Command prompt (Cmd. exe) command-line string limitation
On This PageSUMMARYThis article discusses the limitation to the length of the
strings that you use from the command prompt in Command Prompt (Cmd.exe) and
the methods that you can use to work around this limitation. MORE INFORMATIONOn computers running Microsoft Windows XP or later, the
maximum length of the string that you can use at the command prompt is 8191
characters. On computers running Microsoft Windows 2000 or Windows NT 4.0, the
maximum length of the string that you can use at the command prompt is 2047
characters. This limitation applies to the command line, individual environment variables (such as the PATH variable) that are inherited by other processes, and all environment variable expansions. If you use Command Prompt to run batch files, this limitation also applies to batch file processing. ExamplesThe following list gives you some examples of how this limitation applies to commands that you run in Command Prompt and commands that you use in a batch file.
How to work around the limitationTo work around the limitation, use one or more of the following methods (as appropriate to your situation):
APPLIES TO
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations |





















Back to the top