@echo off
echo wscript.echo dateadd("d",-1,date) >%tmp%\tmp.vbs for /f "tokens=1,2,3* delims=/" %%i in ('cscript /nologo %tmp%\tmp.vbs') do set y=%%i for /f "tokens=1,2,3* delims=/" %%i in ('cscript /nologo %tmp%\tmp.vbs') do set m=%%j for /f "tokens=1,2,3* delims=/" %%i in ('cscript /nologo %tmp%\tmp.vbs') do set d=%%k if %m% LSS 9 set m=0%m% if %d% LSS 9 set d=0%d%
echo %y%-%m%-%d%
set NGINX_DRIVER=c:
set NGINX_PATH=%NGINX_DRIVER%\nginx
set LOG_PATH=%NGINX_PATH%\logs
set Log_Back_Path=%NGINX_PATH%\logback
move %LOG_PATH%\napi.access.log %Log_Back_Path%\napi\access_%y%-%m%-%d%.log move %LOG_PATH%\vercode.access.log %Log_Back_Path%\vercode\access_%y%-%m%-%d%.log
|