Laserfiche WebLink
@echo off <br /> <br />set yyyy= <br /> <br />set $tok=1-3 <br />for /f "tokens=1 delims=.:/-, " %%u in ('date /t') do set $d1=%%u <br />if "%$d1:~0,1%" GTR "9" set $tok=2-4 <br />for /f "tokens=%$tok% delims=.:/-, " %%u in ('date /t') do ( <br /> for /f "skip=1 tokens=2-4 delims=/-,()." %%x in ('echo.^|date') do ( <br /> set %%x=%%u <br /> set %%y=%%v <br /> set %%z=%%w <br /> set $d1= <br /> set $tok=)) <br /> <br />if "%yyyy%"=="" set yyyy=%yy% <br />if /I %yyyy% LSS 100 set /A yyyy=2000 + 1%yyyy% - 100 <br /> <br />set CurDate=%mm%/%dd%/%yyyy% <br /> <br />set dayCnt=%1 <br /> <br />if "%dayCnt%"=="" set dayCnt=1 <br /> <br />REM Substract your days here <br />set /A dd=1%dd% - 100 - %dayCnt% <br />set /A mm=1%mm% - 100 <br /> <br />:CHKDAY <br /> <br />if /I %dd% GTR 0 goto DONE <br /> <br />set /A mm=%mm% - 1 <br /> <br />if /I %mm% GTR 0 goto ADJUSTDAY <br />