BigFix’s lingo doesn’t support the use of wildcards, so how would I create a relevance statement looking for folder’s whose name matches a pattern?
For example: C:\Folder\Subfolder01, Subfolder02, etc…
I want to find all “Subfolders” under “Folder” that have a two-digit number in their name. Something I would regularly do with C:\Folder\Subfolder* in other platforms. The end game is to ‘rmdir /s /q’ the relevant folders.
My best attempt of "exists folder “C:\Folder\Subfolder*” is not working.
find folder <string> of <folder> : folder
Finds the folder with the given wildcard name inside another folder. A wildcard string uses an asterisk to stand for any number of characters (incuding zero), and a question mark to stand for exactly one character. Thus A??.txt would match All.txt and AXE.txt but not all.txt or a.txt.
Be careful about using it, if the folder has a lot of sub-folders the client could take a long time to return results and also you could see more issues.
That sounds like a great solution!
But what does it seem I’m overlooking here?
Q:find folders "*-v*" of folder "C:\temp"
A: C:\temp\POS-v24
A: C:\temp\POS-v26
A: C:\temp\POS-v27
T: 0.621 ms
Q:concatenation "%0d%0a" of ("rd /s /q %22" & pathname of it & "%22") of folders whose (find folders "*-v*" of folder "C:\temp")
E: The operator "folders" is not defined.
STATUS: Running action...
Command failed (Relevance substitution failed) appendfile {concatenation "%0d%0a" of ("rd /s /q %22" & pathname of it & "%22") of folders whose (find folders "*-v*" of folder "C:\temp")}
Command failed (This expression contained a character which is not allowed.) appendfile {concatenation "%0d%0a" of ("rd /s /q %22" & pathname of it & "%22") of folders whose (find folders "*-v*" of folder "C:\temp")}
--- Result ---
Evaluation failed!
Oh, ok, the way it highlighted made me think you might have a line split between “find folders”. At first glance I don’t see anything else wrong with it but may be able to try it later.