I can attest that in dirscan the regex %Y%m%d only validates that for example %m digits are within range 01-12. Regex has no knowledge of current date to compare to the %m value. All %Y%m%d does is validate that the digits meet a valid date format in terms of values.
Our need was to match date stamp in filename to current date then count how many files exist.
Workaround: I told my end user to write a script with output and schedule it, then I can solve it with logmon. Didn't seem ideal since I like to keep directory and file scanning in dirscan for logical reasons, but it is a viable solution.
Original Message:
Sent: Sep 17, 2024 11:44 AM
From: Miller Echagarreta
Subject: Using Regular Expressions (primitive) for files isn't working
Hey @Luc Christiaens and @Petr Ketner Thanks to both for the comments and sugerence...!!!
I can accomplish with the requiriment with dirscan probe because was necessary validate the files daily on hours specific.
Basically i configured the profile to search files with RE: ATH([0][1-9]|[1][0-2])([0][1-9]|[12][0-9]|3[01])001 and watch age of newest file and < 1 minut. For the moment it's working...!!!
Original Message:
Sent: Sep 17, 2024 02:57 AM
From: Petr Ketner
Subject: Using Regular Expressions (primitive) for files isn't working
Hey guys,
I would bet that Luc is right.
How about this?
UNIX:
Set logmon mode to command, fill it with this:
a=`date +'%m%d'`; find <dir> -name "ATH${a}*" | wc -l
Set watcher rules to match any kind of number except 0, set Alarm/Suppression key for $FILENAME.
OS-nondependent
Set logmon mode to updates, set file name:
UNIX: /<directory>/ATH%m%d*
WIN: \<directory>\ATH%m%d*
Set watcher rules to match anything - write down just asterisk (*)
Set alarm suppresion key for $FILENAME.
Note that this only works if files are not empty.
Hope this will help.
Regards
Petr
Original Message:
Sent: Sep 12, 2024 10:50 AM
From: Miller Echagarreta
Subject: Using Regular Expressions (primitive) for files isn't working
Hi Everyone.
I need find with dirscan probe files with this structure, where:
09= month, 12=day
ATH0912001
ATH0912002
ATH0912003
I see the documentation indicate that i can to use this call primitive --->

Example from the documentation:

I am configuring this structure but this is not working ---->
ATH0912001 -- ATH%m%d001
ATH0912002 -- ATH%m%d002
ATH0912003 -- ATH%m%d003
What i doing bad ?