
CODE: [Copy to clipboard]有一批处理文件,内容如下:123456789
CODE: [Copy to clipboard]目的:想将 1.txt 内的 5及5以后的所有字串清空,变成 "1234",该怎么办@echo off
for /f "delims=" %%i in (1.txt) do (
set str=%%i
call set str=%%str:5*=%%
call echo.%%str%%
)
pause
CODE: [Copy to clipboard]for /F "delims=5" %%a in (1.txt) do echo %%a
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |