KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

wildcards and macros

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
berimu



Joined: 11 Feb 2005
Posts: 6
Location: Netherlands

PostPosted: Tue Feb 07, 2006 2:13 am    Post subject: wildcards and macros Reply with quote

I want to check a file, that is created once a week, if there is a certain string in it.
The file name is YYYYMMDD_HHMMSS.log Using a wildcard. But this does not seem to work.
To check the file I use %YYYYMMDD%_*.log
Is there a different way? Or do I do thing wrong?

Ivo
Back to top
View user's profile Send private message Visit poster's website
Yoorix



Joined: 14 Dec 2005
Posts: 177

PostPosted: Tue Feb 07, 2006 8:58 am    Post subject: Reply with quote

You have written macros correctly. It should works.

Are you sure you have checked checkbox "Use date macros" followed by filename input box?

Do you provide file location path correctly?

Regards,
Yoorix
Back to top
View user's profile Send private message
Yoorix



Joined: 14 Dec 2005
Posts: 177

PostPosted: Tue Feb 07, 2006 9:03 am    Post subject: Reply with quote

O-o! Sorry! I pressed Sumbit button too early

Try to remove "_" from filename. It should helps.
Try use %YYYYMMDD%*.log instead of %YYYYMMDD%_*.log

Regards,
Yoorix
Back to top
View user's profile Send private message
berimu



Joined: 11 Feb 2005
Posts: 6
Location: Netherlands

PostPosted: Tue Feb 07, 2006 9:35 am    Post subject: Reply with quote

Sorry too,

Every week a system automatically updates and writes a log file. It starts aon monday 12:00 o'clock and end at a certain time . The date is known but not the endtime. So I use the Test method "compare" "File contains " and the translate macros checked for the string FAILURE.
I hope to check if somewhere in the file I see a Failure.
For example in the file 20060201_132218.log
I check on \\servername\d$\Data\applicationname\Logs\%yyyymmdd%_*.log
Back to top
View user's profile Send private message Visit poster's website
Yoorix



Joined: 14 Dec 2005
Posts: 177

PostPosted: Tue Feb 07, 2006 9:43 am    Post subject: Reply with quote

As I wrote above,
could you apply that string:
\\servername\d$\Data\applicationname\Logs\%yyyymmdd%*.log ,
without "_".
I think in this case character "_" is processed incorrectly.

Regards,
Yoorix
Back to top
View user's profile Send private message
Yoorix



Joined: 14 Dec 2005
Posts: 177

PostPosted: Tue Feb 07, 2006 9:47 am    Post subject: Reply with quote

Why don't you use "Text log" test method instead of "Compare Files"?
I think you should use "Text log" in your case.

Regards,
Yoorix
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12808
Location: USA

PostPosted: Tue Feb 07, 2006 1:09 pm    Post subject: Reply with quote

"Compare Files" test method does not support wildcards.
"Text Log" test method is not appropriate in such case because application creates log file at once, it does not add records one by one during the week. Right?

Solution? H'm.. How do you start that application? Can you use some BAT file to start the application and rename log file when application terminates?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Yoorix



Joined: 14 Dec 2005
Posts: 177

PostPosted: Tue Feb 07, 2006 2:23 pm    Post subject: Reply with quote

[quote="KS-Soft"]"Text Log" test method is not appropriate in such case because application creates log file at once, it does not add records one by one during the week. Right?[/quote]

I've understood, that application creates log file once a week by pattern YYYYMMDD_HHMMSS.log and problem is to check matching to this pattern, isn't it? In this case, I think, 'Text log' test gets better.

Regards,
Yoorix
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12808
Location: USA

PostPosted: Tue Feb 07, 2006 2:31 pm    Post subject: Reply with quote

"Text Log" test method checks for NEW records in the file that already EXISTS

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
berimu



Joined: 11 Feb 2005
Posts: 6
Location: Netherlands

PostPosted: Fri Feb 10, 2006 9:42 am    Post subject: Reply with quote

Did some testing and....... "Text log" is not usable.
But the "Compare" does seem to work using the %YYYYMMDD%*.log notation.
I created a testfile that gave a error when string "Failure" was found and no error when the string was not found. (So far so good.

HOWEVER When I created an error I received reply: Cannot open file \\servername\d$\Data\Logs\20060210*.log
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12808
Location: USA

PostPosted: Fri Feb 10, 2006 10:41 am    Post subject: Reply with quote

Compare Files test method does not support wildcards

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
berimu



Joined: 11 Feb 2005
Posts: 6
Location: Netherlands

PostPosted: Mon Feb 13, 2006 3:56 am    Post subject: Reply with quote

Anyway.
Using the wildcard it does seem to work and finds the correct file. Alas I indeed get the error message.
I also will try to change the logfile name.
Thank Ivo
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index