@echo off
:Loop
set /p input=Input:
echo User: %input% > Hi.txt
type Hi.txt
goto Loop
That is what I have so far.
What I need is the ability to not replace the text file every time
something is input but to just to add the input to the text file,
leaving all the other past inputs.
The computers that will be used are Windows XP.
Thanks!
echo User: %input% > Hi.txt
replaces the file
echo User: %input% >> Hi.txt
appends to the file - at some point, you have to delete it, probably at
the start or end of the program.
--
T.E.D. (tda...@mst.edu) MST (Missouri University of Science and Technology)
used to be UMR (University of Missouri - Rolla).
Replace ">" in the echo.... with ">>".
>> APPENDS to a file, > creates the file anew.
Meanwhile, you could consider changing "user" to %username%
And you might also be better off in alt.msdos.batch.nt since you're using
XP. The command-set for NT and later is substantially enhanced over DOS/9x
which has become the target for this group.
Ha, thank you got it working nice now. The %username% was a great
suggestion. This is the code now.
@echo off
set /p username=Please type your username
:Loop
set /p input=:
echo %username%: %input% >> Hi.txt
type hi.txt
goto Loop
I'll check out .nt also thank you!