Michael Lugassy <[EMAIL PROTECTED]> wrote:
> I'm trying to find the best method for creating:
>
> 1. daily log file, created at midnight by parsing today's log (IIS
> calls it: ex%y%M%D.log)
In a batch file, this should give you daily logs.
FOR /F "tokens=*" %%f in ('date /t') do set date=%%f
Analog EX%date:~7,2%%date:~4,2%%date:~12,2%.log
You'll need to switch the order of the month and date, depending on your
locale, and you can drop the first line on Windows 2000. It can be
easily adopted for monthly logs.
> 2. weekly log file, created at Saturday, on Midnight, parsing the
> entire week log + comparison to last 4 weeks
You can't easily do this in a few lines of batch file. Because weekly
logs roll over on the 1st of the month as well as on Saturday night, on
the first Saturday in the month you have to figure out whether the end
of the previous week occurred in the 5th or 6th "week" of the previous
month. If you want to set up long lookup tables, you can probably get it
to work, but I've never bothered going to the trouble.
> 3. monthly log file, created at Midnight of the end of the month,
> parsing the entire month + comparison to last 3 months.
See above. For some advice on calculating previous months, see
http://www.mail-archive.com/[email protected]/msg06596.html
Aengus
+------------------------------------------------------------------------
| This is the analog-help mailing list. To unsubscribe from this
| mailing list, go to
| http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
| List archives are available at
| http://www.mail-archive.com/[email protected]/
| http://lists.isite.net/listgate/analog-help/archives/
| http://www.tallylist.com/archives/index.cfm/mlist.7
+------------------------------------------------------------------------