简体   繁体   中英

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

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM