Srijani Ghosh
Srijani Ghosh

Reputation: 4216

what is the Max length of input I can provide to a C# program via command prompt?

I am trying to write a simple command prompt program which will take input from used using command prompt. The sample input is:

"InsertLicenseHeader /hf "f:\Repository\WNJavaSourceFileHeader_V1.2.txt" /regexp "^((\r)?\n)?\/\*.+(\(C\)opyright|Copyright \(c\)) ([0-9]{4}-)?[0-9]{4} (by )?Wincor Nixdorf.+This software is the confidential and proprietary information.+terms of the license agreement.+$" /dir "c:\folder with my java project" /ext java /backup 1 /log ".\protocol.log""

However, I am not able to type after

"InsertLicenseHeader /hf "f:\Repository\WNJavaSourceFileHeader_V1.2.txt" /regexp "^((\r)?\n)?\/\*.+(\(C\)opyright|Copyright \(c\)) ([0-9]{4}-)?[0-9]{4} (by )?Wincor Nixdorf.+This software is the confidential and proprietary information.+terms of the licens"

Is there any maximum number of characters specified which should not exceed while giving input via command prompt?

Note: I am using VS2012

Upvotes: 1

Views: 130

Answers (1)

Thomas Ayoub
Thomas Ayoub

Reputation: 29431

Given the MSDN blog:

In Command Prompt, the total length of the following command line that you use at the command prompt cannot contain more than either 2047 or 8191 characters (as appropriate to your operating system)

Your string is 257 char long, which is way under the limitation. I would dig elsewhere...

Upvotes: 3

Related Questions