|
Answer» i have a question i have a textfile NAMED i.txt and one file named zap.bat i want the zap.bat to do an echo command following the text INSIDE i.txt how do i do that? please respond is this possible? :-? :-? :-? :-? :-? :-? :-?First of all, there is no command.exe. Second, your question is unclear. Do you want zap.bat to echo the contents of i.txt? Or do you want zap.bat to insert an echo command at the end of i.txt.
For the former, you can try this:
for /f "tokens=* delims=" %%i in (i.txt) do echo %%i
For the latter, this MAY work:
echo echo >> i.txt
When posters don't share their OS, I assume they have XP....and we all know what happens when we assume. Quote First of all, there is no command.exe. Second, your question is unclear. Do you want zap.bat to echo the contents of i.txt? Or do you want zap.bat to insert an echo command at the end of i.txt.
For the former, you can try this:
for /f "tokens=* delims=" %%i in (i.txt) do echo %%i
For the latter, this may work:
echo echo >> i.txt
When posters don't share their OS, I assume they have XP....and we all know what happens when we assume.
THANK YOU Sidewinder !
|