hi,
I cannot figure out how to do the following:
make a batch file that puts batch code at the start of the text and at the end! example
<input.txt>
@echo off
echo hello!
pause
<output.txt>
echo @echo off >test.bat
echo echo hello! >test.bat
echo pause >test.bat
As you can see i am trying to make a batch file form an existing batch file but i do not want to put "echo" and ">test.bat" every start of and end of a line of code because my code could be 1000-5000 lines of code.
any help would be nice thanks!!
Adding text to every line in a .txt file
Moderator: DosItHelp
Re: Adding text to every line in a .txt file
If you want to do it that way, you also have to escape multiple characters.
I would use the type-command (or the copy-command), if you want to do have with all lines:
penpen
I would use the type-command (or the copy-command), if you want to do have with all lines:
Code: Select all
>>"test.bat" type "input.txt"