What am I doing wrong with this file test date macro?

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
LordJezo
Posts: 28
Joined: Mon Aug 09, 2004 9:55 am

What am I doing wrong with this file test date macro?

Post by LordJezo »

Trying to get a file check macro to pick up this type of format:

slhe_access.2004-09-02.log

From the directory:

E:\logs\slhe\

I have it set in the test to be:

E:\logs\slhe\slhe_access.%yyyy[-1d]%-%mm[-1d]%-%dd[-1d]%.log

(the [-1d] is because the date is always one day behind)

For some reason it is not translating the macro into the day and year. What am I doing wrong??? It keeps telling me the file is not there but I know it is, I am looking at it in the window right now. All of my other date macro type tests work, just not this one.

Any hints?


I just did some more checking into it.. everything works up until the day part of the macro. If I do:

E:\logs\slhe\slhe_access.%yyyy[-1d]%-%mm[-1d]%-02.log

it works fine but as soon as I add in the %dd[-1d]% part the test fails. Today is 03 so it should translate into 02.

Stumped.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Why you do not use E:\logs\slhe\slhe_access.%yyyy-mm-dd[-1d]%.log instead?

Regards
Alex
LordJezo
Posts: 28
Joined: Mon Aug 09, 2004 9:55 am

Post by LordJezo »

KS-Soft wrote:Why you do not use E:\logs\slhe\slhe_access.%yyyy-mm-dd[-1d]%.log instead?

Regards
Alex
Didn't even think of that! I will try it after the weekend and let you know how it went.

Thanks!
Post Reply