7016427 当前离线
列兵
@echo off&setlocal EnableDelayedExpansion set /p d="请提取文件日期(输入格式:20150501):" for /f %%i in ("%date%") do ( set cur_day=%%i ) cd /d d:\srrb\ for /f "tokens=1-3*" %%a in ('dir /a:%-d% /t *.xls^|findstr /b [0-9]') do ( if "!cur_day!"=="%%a" echo f | xcopy "%%d" /y e:\rq\%d%\ ) echo 提取完毕! pause复制代码
评分人数
TOP
yangfengoo 当前离线
上尉
@echo off&setlocal EnableDelayedExpansion set /p d="请提取文件日期(输入格式:20150501):" cd /d d:\srrb\ for /f "tokens=1-3*" %%a in ('dir /a:%-d% /t *.xls^|findstr /b [0-9]') do ( if "%%a"=="!d:~,4!-!d:~4,2!-!d:~6,2!" xcopy /f "%%d" /y e:\rq\%d%\ ) echo 提取完毕! pause复制代码