
CODE: [Copy to clipboard]@echo off
for /f "delims=" %%i in ('dir /b/s/a-d "d:\txt\*.txt"') do (
findstr /v /c:"//sdfgfsdgtrhgfd gfdg" "%%i" >"%%~dpni.new"
del /q "%%i"
ren "%%~dpni.new" "%%~ni.txt"
)
CODE: [Copy to clipboard]不足之处高手扶正,谢谢!@echo off
set act=/
for /f "delims=" %%i in ('dir /b/s/a-d "d:\txt\*.txt"') do (
type "%%i" | find /v "%act%" >"%%~dpni.new"
del /q "%%i"
ren "%%~dpni.new" "%%~ni.txt"
)
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |