
CODE: [Copy to clipboard][ Last edited by zw19750516 on 2008-4-27 at 12:42 AM ]@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in ('type xxx.ini') do (
set str=%%i
set str=!str:c:\dir1\dir2=c:/dir1/dir2!
set /a n+=1
if !n! equ 1 (
echo !str!>xxx.ini
) else (
echo !str!>>xxx.ini
)
)
echo 已对xxx.ini执行改写。
pause>nul
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard]@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in ('type xxx.ini') do (
set str=%%i
set str=!str:^\=^/!
set /a n+=1
if !n! equ 1 (
echo !str!>xxx.ini
) else (
echo !str!>>xxx.ini
)
)
echo 已对xxx.ini执行改写。
pause>nul
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |