例如,我有一个文档
abc.txt
ico=abcd.ico
exe=abcde.exe
xo=bcd
yo=bad
现在我读取这个文件,并且只修改其中的.exe段.怎么修改..
set /p write=请输入要修改的项目~!^>
for /f "tokens=* " %%i in (abc.txt) do (
echo %%i | find /i "exe=">nul
if not errorlevel 1 (
echo %write%>>_newabc.txt
) else (
echo %%i>>_newabc.txt
)
)
我想要的是.象在c++那样的.
随时在某个特定段里插入自定义的字符串
[ Last edited by flyinspace on 2007-3-26 at 09:47 PM ]
abc.txt
ico=abcd.ico
exe=abcde.exe
xo=bcd
yo=bad
现在我读取这个文件,并且只修改其中的.exe段.怎么修改..
set /p write=请输入要修改的项目~!^>
for /f "tokens=* " %%i in (abc.txt) do (
echo %%i | find /i "exe=">nul
if not errorlevel 1 (
echo %write%>>_newabc.txt
) else (
echo %%i>>_newabc.txt
)
)
我想要的是.象在c++那样的.
随时在某个特定段里插入自定义的字符串
[ Last edited by flyinspace on 2007-3-26 at 09:47 PM ]
