(view source code of userin.bat as plain text)
@ECHO OFF
:: UserInNT.bat:: How to use the TYPE CON command to receive user input:: Written by Rob van der Woude:: http://www.robvanderwoude.comECHO.
ECHO Demonstration of receiving user input through the TYPE CON command.
ECHO Type in any string and close by pressing Enter, F6 (or Ctrl+Z), Enter.
ECHO Only the last non-empty line will be remembered, leading spaces are ignored.
ECHO.
:: Only one single command line is needed to receive user inputFOR /F "tokens=*" %%A IN ('TYPE CON') DO SET INPUT=%%A
:: Use quotes if you want to display redirection characters as wellECHO You typed: "%INPUT%"
page last modified: 2025-10-11; loaded in 0.0051 seconds