Using regex to find filename?

(imported topic written by atxrobbie)

I’m having trouble using regex to find a filename. I need to check to see if a file exists, but i only know a regex pattern for the filename and not the filename itself. is this something that is possible to do?

thanks,

Robbie

(imported comment written by jgolembi)

atxrobbie,

This is completely do-able. I am not to skilled in the regular expression area, but maybe if you give me the expression I might be able to mock something up for you.

I would highly recommend that you download

this help file

and review the regular expression sections.

Also I would recommend that you get the

QNA fixlet debugger

  • invaluable when trying to get just the right answer to come back.

A few more helpful links:

http://support.bigfix.com

  • support search site for BigFix

Bigfix Documentation

  • Here you can find guides on Web reports, the Console, etc.

Fixlet authoring Wiki

Hopefully this all makes sense.

-John G

(imported comment written by SystemAdmin)

Try something like:

Q: names of files of folder "C:\QNA 7.2.5.22"
A: eval.exe
A: libBEScrypto_1_0_0_1.dll
A: PSAPI.DLL
A: qna.exe
A: RelevanceDebugger.exe
 
Q: exists matches (regex "^libBES*") of names of files of folder "C:\QNA 7.2.5.22"
A: True

I will leave it to you to craft the actual regular expression. :slight_smile:

(imported comment written by SystemAdmin)

Here are many more examples of using regex in relevance:

http://bigfix.me/cdb/search/relevance/regex