Batch File input validation - Make sure user entered an integer

前端 未结 16 2360
抹茶落季
抹茶落季 2020-12-03 14:33

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

16条回答
  •  伪装坚强ぢ
    2020-12-03 15:18

    In addition to the remark about the error that occures when spaces are part of the users input. You can use errorlevel errorlevel=9165. It can be used for the spaces in a string or for the error handling of 'no' input.

    Kind Regards,

    Egbert

提交回复
热议问题