You can use
echo, and redirect the output to a text file (see notes below):
rem Saved in D:\Temp\WriteText.bat @echo off echo This is a test> test.txt echo 123>> test.txt echo 245.67>> test.txt
D:\Temp>WriteText D:\Temp>type test.txt This is a test 123 245.67 D:\Temp>
@echo offturns off printing of each command to the console
>>will write to the current directory (the directory the code is being run in).
echo This is a test > test.txtuses one
>to overwrite any file that already exists with new content.
echostatements use two
>>characters to append to the text file (add to), instead of overwriting it.
type test.txtsimply types the file output to the command window.
~ Answered on 2013-11-09 17:05:09