I am trying to get the pathname of files which contains specific keyword “exe” or “txt” or etc.
I can get the result if I parse single keyword “exe”, but I have around 20 keywords to search.
Here is the relevance im using.
Q: (pathnames of it as string) of (descendants whose (pathname of it as lowercase contains (“exe”;“txt”) ) of folders "" of drives)
E: A singular expression is required.
Please note that searching through a lot of folders like this can be very costly and should not really be done in relevance within fixlets/tasks/baselines/analyses. If you are just looking for a quick relevance statement to troubleshoot something in the relevancedebugger you can use something like:
pathnames whose (exists match (regex "(\.exe$)|(\.txt$)" ) of it) of descendants of root folders of drives
But again, it’s not recommended to use this within the platform at all. Better approaches are outlined in the link above.
(Note: the statement above takes over a minute to evaluate in my relevance debugger -> it would take the client 50 times longer)
Thanks Marjan for your quick response.
This helped me exactly what I needed.
Fetching txt and exe files are just examples, I am looking for others files which might not even reside in my environment.