如何搜索.doc而不搜索.docx
bat吧
全部回复
仅看楼主
level 3
T981284270
楼主
for语句用*.doc会把*.docx也搜出来,怎么解决
2015年08月25日 03点08分
1
level 9
我要上天aaaaa
搜索*.docx,然后全部删除,再搜索*.doc即可。
2015年08月25日 04点08分
2
level 14
aiwozhonghuaba
for /f "delims=" %%i in ('dir /a-d /b *.doc^|findstr ".*doc$"') do echo %%i
2015年08月25日 09点08分
3
T981284270
谢谢,另外这个语句能指定搜索位置吗?比如说搜索F盘
2015年08月25日 15点08分
aiwozhonghuaba
@T981284270
dir /a-d /b F:\ *.doc
2015年08月26日 01点08分
1