Log File monitoring

HI all,


I use OMW8.16 and I want to monitor log files but all log files name chnage every day and all of them in the same directoy


I use below command to retun only the required log file name


<`dir /b /s /o:-d D:\EJADA\InmaMessages | find "D:\EJADA\InmaMessages\InmaATMMessages_" | "cmd /q /v:on /c /D "set/p .=&echo(!.!""`> 


i put this command in the log file policy and when I deployed it i get the below two warning and major messages 



Cannot open file <`dir /b /s /o:-d D:\EJADA\InmaMessages | find "D:\EJADA\InmaMessages\InmaATMMessages_" | "cmd /q /v:on /c /D "set/p .=&echo(!.!""`>.
System Error Number: 2 (2) - The system cannot find the file specified.




The process 'dir /b /s /o:-d D:\EJADA\InmaMessages | find "D:\EJADA\InmaMessages\InmaATMMessages_" | "cmd /q /v:on /c /D "set/p .=&echo(!.!""' terminated with a non-zero exit code. (OpC20-432)



although If i try this command in the command line it work file and it return the required log file name !!


Is there any thing missing form my side ?