Michael Lugassy <[EMAIL PROTECTED]> wrote:
>> 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
>>
>
> Cool! Worked.
>
>>> 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...
>
> I'm wondering what do you suggest. I have a medium-high traffic site
> and need to generate reports for the managment on routine basis.
> what do you think is enough and how do you recommend to provide the
> reports?
My own preference is to log daily, and, if you want to generate a report
for the last 7 days, use a VBscript or perl script to get the file names
(in VBscript
dateadd("d", -7, date)
will give you the date for 7 days ago, even if today is January 3rd, for
example).
>>> 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
>
> I read your nostalgic message and was very impressed. unforunatly, I
> didn't understand how "ANALOG y:\folder\ex%year%%lastmonth%.log" will
> allow me to process the entire month of logs? (if there are 28-31 log
> files that correspond to this month?)
A monthly logfile is just a single logfile, with the format EXYYMM.log.
If you want all the daily logs for a specific month, then EXYYMM*.log
will do the job.
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
+------------------------------------------------------------------------