gddsssko 当前离线
上等兵
评分人数
qixiaobin0715 当前离线
大校
TOP
aloha20200628 当前离线
少校
@echo off setlocal enabledelayedexpansion for /f "delims=" %%i in (KeyWord.txt) do set KeyWord=!KeyWord!"*%%i*.rar" for /f "delims=" %%i in ('dir /b /s /a-d %KeyWord%') do copy "%%i" "c:\test\" pause复制代码
hfxiang 当前在线
上尉
@echo off cd/dC:\MyFile for /f "tokens=*" %%a IN (文件名关键词.txt) DO @for /f "tokens=*" %%b in ('dir "*%%~a*.rar" /b/s') do copy "%%~b" "C:\Test\"复制代码
@echo off cd/dC:\MyFile for /f "tokens=*" %%a in ('dir *abc123*.rar *abc456*.rar /b/s') do copy "%%~a" "C:\Test\"复制代码