Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch File limiting characters
Name: DarkGreen16 Date: September 2, 2004 at 00:25:29 Pacific OS: XP CPU/Ram: N/A
Comment:
Hey, Im trying to limit the amount of characters someone is allowed to use to 1.
This is what im working with
SET Choice= SET /P Choice=What would you like to do?: IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%
so basically what would I have to add to that to make it so you can only input one character
Summary: NT systems have the %OS% variable set by default to 'Windows_NT', and non-NT systems don't. So, if you just want to act depending if the OS is NT (Win NT4,2000,XP) or non-NT (Win9x, Dos 6.22), this wi...
Summary: If you have a working knowledge of batch files you can certainly write this yourself. Get the date into a variable: http://home7.inet.tele.dk/batfiles/main/batchfaq.htm#6 Parse the string: http://home...
Summary: The IF command compares values in a logical expression to determine a TRUE or FALSE result. If the result is TRUE, the command to the right of the IF is performed. If the result is FALSE, the IF com...