
CODE: [Copy to clipboard]for /r C:\test %a in (*.txt) do @if "%~nxa" equ "a b.txt" echo %a
| Quote: | |
|
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard][ Last edited by tireless on 2008-10-27 at 15:32 ]@echo off
set /p filename=请输要删出的文件名:
for %%a in (c: d:) do (
for /f "delims=" %%b in ('dir /s /b /a:-d %%a\%filename% 2^>nul') do (
del /F "%%b" 2>nul
del /F /a:h "%%b" 2>nul
)
)
pause
CODE: [Copy to clipboard][ Last edited by tireless on 2008-10-27 at 16:07 ]@echo off
set /p filename=请输要删出的文件名:
for %%a in (c: d:) do (
cd /d %%a\
for /f "delims=" %%b in ('dir /s /b /a:-d %filename% 2^>nul') do (
del /F "%%b" 2>nul
del /F /a:h "%%b" 2>nul
)
)
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |