Windows批量查找文件

Posted eos666

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows批量查找文件相关的知识,希望对你有一定的参考价值。

for /r 目录名 %i in (匹配模式1,匹配模式2) do @echo %i

for /r SATA %i in (*.txt) do @echo %i

D:REY est>for /r "D:REYSATA" %i in (*.doc) do move /y "%i" .


for /r . %i in (*.doc) do move /y "%i" 01-WORD


for /r "D:REYSATA" %i in (*.doc,*.docx) do move /y "%i" "D:REY est1-WORD"


for /r "D:REYSATA" %i in (*.xls,*.xlt,*.xlsx) do move /y "%i" "D:REY est1-EXCEL"

========================================= copy 测试 ================================================
for /r "D:REYSATA" %i in (*.doc,*.docx) do copy /y "%i" "D:REY est1-WORD"

for /r "D:REYSATA" %i in (*.xls,*.xlsx) do copy /y "%i" "D:REY est2-EXCEL"

for /r "D:REYSATA" %i in (*.ppt,*.pptx) do copy /y "%i" "D:REY est3-PPT"

for /r "D:REYSATA" %i in (*.pdf) do copy /y "%i" "D:REY est4-PDF"

for /r "D:REYSATA" %i in (*.rar,*.zip) do copy /y "%i" "D:REY est5-RAR_ZIP"

for /r "G:gao" %i in (*.mp4,*.3gp,*.rmvb,*.wmv,*.avi,*.swf) do copy /y "%i" "G:gao-data1-可用8-MEDIA"


========================================= move 操作 ================================================
for /r "D:REYSATA" %i in (*.doc,*.docx) do move /y "%i" "D:REY est1-WORD"

for /r "D:REYSATA" %i in (*.xls,*.xlsx) do move /y "%i" "D:REY est2-EXCEL"

for /r "D:REYSATA" %i in (*.ppt,*.pptx) do move /y "%i" "D:REY est3-PPT"

for /r "D:REYSATA" %i in (*.pdf) do move /y "%i" "D:REY est4-PDF"

for /r "D:REYSATA" %i in (*.rar,*.zip) do move /y "%i" "D:REY est5-RAR_ZIP"

for /r "D:REYSATA" %i in (*.jpg,*.jpeg,*.png,*.jif,*.bmp) do move /y "%i" "D:REY est6-IMAGE"

for /r "D:REYSATA" %i in (*.txt,*.chm,*.rtf) do move /y "%i" "D:REY est7-OtherFile"







以上是关于Windows批量查找文件的主要内容,如果未能解决你的问题,请参考以下文章

如何批量执行sql查找替换?

windows下批量解压jar并查找特定字符串

windows下批量解压jar并查找特定字符串

linux批量操作文件命令总结

linux下按文件名和文件内容查找文件

webstorm常用快捷键_ Windows篇