From: "Jeremy Wadsack" <[EMAIL PROTECTED]>
> Monica Hooge ([EMAIL PROTECTED]):
>
> > I have my Windows 2000 server, running IIS 5, creating a weekly log
> > file (W3SVC1 format) named something like ex020103.log, where 020103
> > equals YYMMWW. I want to set the scheduler up to run Analog every
> > Monday, early a.m. hours and use the prior weeks log file. What code
> > line do I enter to tell it to pull last week's log file?
>
> You'll have to do some fancy scripting with Windows 2000 command
> prompt. Look in Start | Help | Contents (tab) | Reference (book) |
> MS-DOS Commands. You might find other more useful documents from
> related links.
>
> I don't know the specific, but I'm fairly certain there's a way of
> creating a command prompt that will run Analog on the current week's
> log files.
You can get the day or the month easily enough, but not the week. For
example, as far as I can remember, the week rolls over at midnight GMT on
Saturday, which is 5PM on Saturday evening in Texas. If Monday is the
first of the month, then the logfile for Sunday could be EXYYMM04,
EXYYMM05 or EXYYMM06, depending on the circumstances - there really isn't
any way to calculate that easily.
The simplest way to handle weekly logs is to run Analog immediately after
the log rolls over, and then call Analog with *.LOG and then move *.log to
a different folder. You'll get a few extra entries because you might have
the beginning of the new log file too, but the new log file won't be
moved, because IIS has it open.
I'd strongly recommend logging on a daily basis, or even on a monthly
basis, if the logs aren't too long. If you log monthly, you can use
FROM -00-00-07
to get the last 7 days, but you still have to deal with month ends.
You can get the day and month within a batch file on NT by using the
following command:
for /f "tokens=2,3 delims=/ " %%f in ('date /t') do set today=%%f%%g
(You need to double up % signs in a batch file)
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
+------------------------------------------------------------------------