1

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

Srijani Ghosh
  • 3,935
  • 7
  • 37
  • 68
  • Are you talking about the limit in the debugger's command line start options or when actually running on the command line? – juharr Nov 10 '15 at 12:58
  • What do you mean by *cannot type*? where are you typing? - You are not hitting the native limit: [Maximum Length of Command Line String](http://stackoverflow.com/questions/3205027/maximum-length-of-command-line-string) – Alex K. Nov 10 '15 at 12:58

1 Answers1

3

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

Thomas Ayoub
  • 29,063
  • 15
  • 95
  • 142