adding a line at the end of the .bat file ignoring the newline
I have a .bat file with the following structure:
istruction1[newline]
I would like to append some parameters in a way that the resulting file is:
开发者_开发问答istruction1 param
currently i have:
istruction1[newline]
param
Basically I want to get rid of the newline...how can I do that?
thanks a lot!
Try this one:
@echo off
for /f "delims=" %%i in (my.bat) DO echo %%i param
This little script will append param
at the end of every (non empty) line in your input file (my.bat
). You can also issue that directly from the command line, simply substituting %%
with a single %
:
for /f "delims=" %i in (my.bat) DO echo %i param
精彩评论