Date macro and scripts

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
spud
Posts: 22
Joined: Thu Dec 16, 2004 9:34 am

Date macro and scripts

Post by spud »

I am running version 5.12 and have a question about the use of date macros.

Right now my log file changes each night and I am using the file name format mm-dd-yy.txt. Each night I am updating some reports that include all the daily logs for the current month. In the script that runs the nightly reports, I append each of the daily log files before running the report. To append each daily log file, I us a macro like this:

Append c:\program files\hostmonitor\Logs\%mm%-01-%yy%
Append c:\program files\hostmonitor\Logs\%mm%-02-%yy%
(continue day 1 through day 31)
Append c:\program files\hostmonitor\Logs\%mm%-30-%yy%
Append c:\program files\hostmonitor\Logs\%mm%-31-%yy%

This works great at the end of the month, but at the start of each month, the script creates a report with only 1 day's data. What I really would like is to use the data from the previous 30 days. My question: Is there any way to reference a log file date relative to today? Or some other way to accomplish the same task?
For example: %dd-1% (i.e. today-1 day) or %dd-2% (today-2 days)
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Sorry, Log Analyzer does not provide such option.
May be in next version...

Regards
Alex
Post Reply