Expression to get filename of logfile

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
jfreude
Posts: 27
Joined: Tue Oct 19, 2004 7:14 am

Expression to get filename of logfile

Post by jfreude »

Hi everybody,

i'm trying to use a expression to get the filename of a logfile
from the last hour, but couldn't get it working....

This one works:
\\cr0000794\LDHiQ\%yymmddhh[-1d]%00.ts

This one doesn't work:
\\cr0000794\LDHiQ\%yymmddhh[-1h]%00.ts

We're using HostMonitor 9.84.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Where exactly do you use this expression?
Do you want to set (specify) file name for common logging?
private logging?
or you are trying to setup Text Log test item?
something else?

Anyway, in some expressions you can substract days, months or years, in other you cannot; but HostMonitor does not support operations with hours.

Regards
Alex
jfreude
Posts: 27
Joined: Tue Oct 19, 2004 7:14 am

Post by jfreude »

Hi Alex,

sorry for my bad description, the expression ist used within the
test 'folder/file size' to get the filename.

Regards
Juergen
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Yes, you can use expressions here, just not operation with hours
Rules:
1.to subtract a number of days from current date, use expression like [-NNd] (e.g. %dd[-1d]%)
2.to add a number of days to current date, use expression like [+NNd] (e.g. %ddd[+22d]%)
3.to subtract a number of months from current date, use expression like [-NNm] (e.g. %dm[-24m]%)
4.to add a number of month to current date, use expression like [+NNm] (e.g. %ddmm[+1m]%)
5.to subtract a number of years from current date, use expression like [-NNy] (e.g. %dmyy[-2y]%)
6.to add a number of years to current date, use expression like [+NNy] (e.g. %ddmmyyyy[+10y]%)
7.expression must be concluded in the same percent signs (%) that concludes date variables
8.expression must be specified after regular date variables (e.g. %dd[-1d]% - correct expression, %[-1d]dd% - incorrect expression)
9.you may use only one expression in each macro variable.

Regards
Alex
Post Reply