本帖最后由 pcl_test 于 2015-12-5 01:11 编辑
- @echo off
- set 时=08
- set 日=-1
- set h=%time:~,2%
- if %h% geq 0 if %h% leq 8 set 时=20
- if %h% geq 20 if %h% leq 23 set 日=0&set 时=20
- for /f %%a in ('mshta VBScript:Execute("NewDate=date()+(%日%):FmtDate=year(NewDate)&right(""0""&month(NewDate),2)&right(""0""&day(NewDate),2):CreateObject(""Scripting.FileSystemObject"").GetStandardStream(1).Write FmtDate"^)(close^)') do set 日期=%%a
- ::日期时间无误,去掉echo;即可复制
- echo;xcopy "d:\aqi\%日期%%时%\*" "e:\aqi\%日期%%时%\" /s /y
- pause
复制代码
|