hlzj88 当前离线
少校
@echo off&&setlocal enabledelayedexpansion set p=0 cd /d E:\123\ for /f "delims=" %%a in ('dir /a-d/b *') do findstr /r "中国" %%a&&set /a p+=1&&xcopy /d /y /e "%%a" "D:\456\" if !p! geq 1 (echo 找到!p!个) else (echo 没有找到) pause复制代码
TOP
qixiaobin0715 当前离线
大校
@echo off cd /d E:\123 for /f "delims=" %%a in ('dir /b /s /a-d *中国*') do copy "%%a" "D:\456" pause复制代码