
CODE: [Copy to clipboard]目标:1,a
2,f
1,c
CODE: [Copy to clipboard]尝试过如下代码,结果list.txt内容被完全清空1,a
1,c
CODE: [Copy to clipboard]请各位解疑,谢谢。findstr /V "1" list.txt>list.txt
CODE: [Copy to clipboard]@echo off
set hello=&set "fl=1.txt"
for /f "delims=" %%a in ('findstr /v "1" "%fl%"') do (
if not defined hello (
set hello=hello
>"%fl%" echo.%%a
) else (
>>"%fl%" echo.%%a
)
)
start "" "%fl%"
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |