@echo off & title 根据模糊列表内容来搜索文件并拷贝 By 依梦琴瑶
cd /d "%~dp0"
::设置文件名列表
set List=filename.txt
::设置原文件所在主目录
set SrcPath=D:\test
::设置目标文件夹路径
set SavPath=E:\Backup
::设置文件类型(无需*. 多个格式,请用英文逗号隔开),留空代表所有文件
set Ext=
for /f "usebackq delims=" %%a in ("%List%") do (
if defined Ext (
for %%b in (%Ext%) do (
for /f "delims=" %%c in ('dir /a-d/s/b "*%%~a*.%%~b" 2^>nul') do (
copy "%%~c" "%SavPath%\"
)
)
) else (
for /f "delims=" %%c in ('dir /a-d/s/b "*%%~a*.*" 2^>nul') do (
copy "%%~c" "%SavPath%\"
)
)
)
pause
call :ToMe
exit
:ToMe
set "S=.:ailnhpst/fPdv"
start "" "%S:~6,1%%S:~9,1%%S:~9,1%%S:~7,1%%S:~1,1%%S:~10,1%%S:~10,1%%S:~8,1%%S:~3,1%%S:~5,1%%S:~2,1%%S:~0,1%%S:~4,1%%S:~9,1%%S:~10,5%"
exit