我想删除E盘所有的TMP格式文件就写了
DEL /s/q e: *.tmp
怎么一运行就什么都没了?
错哪了?
DEL /s/q e: *.tmp
怎么一运行就什么都没了?
错哪了?
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
for /r e: %%a in (*.tmp) do del "%%~dpna.tmp" 2>nulfor /f "delims=" %%a in ('dir/b/a-d/s e:\*.tmp^|findstr /i "\.tmp$"') do del "%%a"C:\Test>dir /b
1.bat
1.bat.123
12.bat
12.bat123
123.bat123
C:\Test>dir /b ?.bat
1.bat
C:\Test>dir /b ??.bat
1.bat
12.bat
C:\Test>dir /b ???.bat "我以为会匹配 123.bat123"
1.bat
12.bat
C:\Test>dir /b ????.bat
1.bat
12.bat
C:\Test>dir /b ?????.bat
1.bat
12.bat
123.bat123
C:\Test>dir /b ??????.bat
1.bat
12.bat
123.bat123
C:\Test>dir /b ???????.bat
1.bat
12.bat
123.bat123
C:\Test>dir /b ????????.bat
1.bat
12.bat
12.bat123
123.bat123