Windows批量查找文件
2021-07-09 04:06
标签: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" . ========================================= copy 测试 ================================================ 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" 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
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"
for /r "D:\REY\SATA" %i in (*.doc,*.docx) do copy /y "%i" "D:\REY\test\01-WORD"
========================================= move 操作 ================================================
for /r "D:\REY\SATA" %i in (*.doc,*.docx) do move /y "%i" "D:\REY\test\01-WORD"