Solved How can I write a line of text, in another file with Batch?

February 7, 2014 at 18:37:33
Specs: Windows XP
I simply want to know how to write a line of text,
in another file with a Batch input, so I type something, and it adds that to a file.

See More: How can I write a line of text, in another file with Batch?

Report •

#1
February 7, 2014 at 19:45:24
✔ Best Answer
::batch
@echo off
:1
set z=
set /p z=enter text:
if not defined %z% goto :eof
>>accum.txt echo %z%
goto :1
::------ end batch
You'll need to make arrangements to allow for blank/null lines, such as testing for %z%=" " for example.

CMD:
echo. 2>>accum.txt|copy /b accum.txt+con

but CMD version, someone nees to know that ctrl-Z ends the input

message edited by nbrane


Report •
Related Solutions


Ask Question