I\'m experimenting with a Windows batch file to perform a simple operation which requires the user to enter a non-negative integer. I\'m using simple batch-file techniques t
You may use ReadFormattedLine subroutine for all kind of formatted input. For example, the command below read a number of up to 5 digits:
call :ReadFormattedLine UserInput="#####" /M "Please Enter a Number: "
This subroutine is written in pure Batch so it does not require any additional program, and it allows several formatted input operations, like read passwords. In previous example, the subroutine reads a number of up to 5 digits. You may download ReadFormattedLine subroutine from Read a line with specific format.