write user input to output file
Posted: 05 May 2011 07:08
Hi,
I want to prompt a user for input, then write the results to
a file (say, C:\USERINPUT.TXT, for example)
C:\USERINPUT.TXT:
Joe Smith
000-555-1212
Any suggestions on how to do this?
Thanks for any help.
Current code:
I want to prompt a user for input, then write the results to
a file (say, C:\USERINPUT.TXT, for example)
C:\USERINPUT.TXT:
Joe Smith
000-555-1212
Any suggestions on how to do this?
Thanks for any help.
Current code:
Code: Select all
:input
set INPUT=
set /P INPUT=Type Enter your name please : %=%
if "%INPUT%"=="" goto input
echo Your input was: %INPUT%
:input2
set INPUT2=
set /P INPUT2=Type Enter your phone # : %=%
if "%INPUT2%"=="" goto input2
echo Your input was: %INPUT2%