@echo offpushd F:for /f "delims=" %%a in ('dir /a-d /b /s ^| findstr "[^\\]*关键词[^\\]*$" ') do (copy "%%~a" "D:\指定位置\")popdpause
假如把F盘中包含关键字“天空”的文件复制到D盘
cd /d f:\for /f "delims=" %%a in ('dir /a-d/s/b^|findstr /r "天空"') do xcopy /y "%%a" f:\