user input in batch file and write to txt file with data

April 25, 2012 at 04:22:31
Specs: Windows XP
hi guys,

i need some help with getting user input from a batch file, specifically, i want the user to input the "name" of his pc and add that info into an unattended file to use is sysprep.

I've gotten this far with my batch file:

:input
set INPUT=
set /P INPUT=Type input: %=%
if "%INPUT%"=="" goto input
echo Your input was: %INPUT%
echo %input%>> file.txt

the above batch file works well, i just need it to write into a txt file that already has info in it and put the "%INPUT%" into the txt file where I specifiy the variable....

Or maybe someone has a better way of doing it....
would be a great help


See More: user input in batch file and write to txt file with data

Report •


#1
April 25, 2012 at 09:04:19
As a rule, I tell people not to attempt editing XML files though batch scripts. This is no exception.

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question