wildcards and macros
wildcards and macros
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
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
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
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
"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
"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
[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
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
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
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