Originally posted by qingfushuan at 2007-6-10 09:21 AM:
for /f "tokens=1,2* delims=:" %%a in ("%time%") do (
set /A tm=%%b+1
set /A tm=!tm!%%60
set tm1=%%a:!tm!
at !tm1! c:\delcopyrar.bat
)
这个会在每小时59分出现问题,下面的要全点
@echo off &Setlocal EnableDelayedExpansion
for /f "tokens=1,2* delims=:" %%a in ("%time%") do (
set /A tm=%%b+1
set /A tm1=%%a+1
if not "!tm!" lss "60" goto :tm2
set /A tm=!tm!%%60
set tm2=%%a:!tm!
at !tm1! c:\delcopyrar.bat
)
goto :eof
:tm2
set /A tm=!tm!%%60
set /A tm1=!tm1!%%24
set tm2=!tm1!:!tm!
at !tm2! c:\delcopyrar.bat