(view source code of usrinput.bat as plain text)
@ECHO OFF
REM * Ask for USeR INPUT and store it in variable USRINPUTREM * Assumes ANSI.SYS is loadedREM * Written by Rob van der WoudeSET USRINPUT=
REM * Turn on ANSI key translation (translate EnterREM * key to F6+Enter sequence) and ask for input:ECHO ←[13;0;64;13pEnter one word only . . .
REM * Copy entered text to temporary file:COPY CON %TEMP%.\~USRINP.TMP
REM * Turn off ANSI key translation and clear irrelevant screen output:ECHO ←[13;13p←[3A←[K←[1B←[K←[1B←[K←[2A
REM * Add empty line to temporary file. The empty lineREM * will be used to stop DATE asking for new date.ECHO.>> %TEMP%.\~USRINP.TMP
ECHO.>> %TEMP%.\~USRINP.TMP
REM * Create a temporary batch file that will store theREM * entered text into the environment variable USRINPUT:TYPE %TEMP%.\~USRINP.TMP | DATE | FIND "):" > %TEMP%.\~USRINP.BAT
REM * Create more temporary batch files. AddREM * more command line parameters if necessary,REM * as in: ECHO SET USRINPUT=%%3 %%4 %%5 %%6 %%7 %%8 %%9>CURRENT.BATECHO SET USRINPUT=%%3>CURRENT.BAT
REM * VOER.BAT and TYP.BAT are replacements for CURRENT.BAT for DutchREM * DOS versions; add your own language versions if necessary:ECHO SET USRINPUT=%%6>VOER.BAT
ECHO SET USRINPUT=%%4>TYP.BAT
REM * This temporary batch file now sets the variable USRINPUT:CALL %TEMP%.\~USRINP.BAT
REM * Display the result:ECHO You typed: ←[1m%USRINPUT%←[0m
ECHO.
PAUSE
REM * Finally, clean up the mess of temporary files:FOR %%A IN (%TEMP%.\~USRINP.BAT %TEMP%.\~USRINP.TMP VOER.BAT TYP.BAT CURRENT.BAT) DO DEL %%A
page last modified: 2025-10-11; loaded in 0.0047 seconds