码迷,mamicode.com
首页 > Windows程序 > 详细

Windows批量查找文件

时间:2018-09-28 12:48:42      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:The   -o   data   xlsx   ppt   xls   media   ocx   window   

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

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

D:\REY\test>for /r "D:\REY\SATA" %i in (*.doc) do move /y "%i" .


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


for /r "D:\REY\SATA" %i in (*.doc,*.docx) do move /y "%i" "D:\REY\test\01-WORD"


for /r "D:\REY\SATA" %i in (*.xls,*.xlt,*.xlsx) do move /y "%i" "D:\REY\test\01-EXCEL"

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

for /r "D:\REY\SATA" %i in (*.xls,*.xlsx) do copy /y "%i" "D:\REY\test\02-EXCEL"

for /r "D:\REY\SATA" %i in (*.ppt,*.pptx) do copy /y "%i" "D:\REY\test\03-PPT"

for /r "D:\REY\SATA" %i in (*.pdf) do copy /y "%i" "D:\REY\test\04-PDF"

for /r "D:\REY\SATA" %i in (*.rar,*.zip) do copy /y "%i" "D:\REY\test\05-RAR_ZIP"

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


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

for /r "D:\REY\SATA" %i in (*.xls,*.xlsx) do move /y "%i" "D:\REY\test\02-EXCEL"

for /r "D:\REY\SATA" %i in (*.ppt,*.pptx) do move /y "%i" "D:\REY\test\03-PPT"

for /r "D:\REY\SATA" %i in (*.pdf) do move /y "%i" "D:\REY\test\04-PDF"

for /r "D:\REY\SATA" %i in (*.rar,*.zip) do move /y "%i" "D:\REY\test\05-RAR_ZIP"

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

for /r "D:\REY\SATA" %i in (*.txt,*.chm,*.rtf) do move /y "%i" "D:\REY\test\07-OtherFile"

Windows批量查找文件

标签:The   -o   data   xlsx   ppt   xls   media   ocx   window   

原文地址:https://www.cnblogs.com/eos666/p/9717464.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!