Once a Day
I often see questions related to running a process only the first time a system is booted on a given calender day. I created the following batch file for someone to do just that. The explaination may never get built, but you're welcome to the batch file.

:: 1ADAY.BAT - A procedure that runs a process only once a day. :: Syntax: Call 1ADAY ProgramName [Arg1 [Arg2 [... [Arg9]]]] :: Tom Lavedas <lavedas@pressroom.com> :: http://www.pressroom.com/~tglbatch/ :: Revised 26 Aug 97 for compatiblity with Windows 95 :: @echo off set {d}=>c:\call.{1} dir c:\*.{?} /o-d | find "{" > {2}.bat echo set {d}=%%2>{1}.bat echo if '%%{d}%%=='%%3 set {d}=>{date}.bat call {2} for %%v in ({?}.bat {date}.bat c:\call.{1}) do del %%v if '%{d}%==' goto End shift call %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 rem>c:\{date}.{_} :End set {d}=




Top | General Notes | Homepage