I like this…a lot. It’s a different approach than what I was taking and is quite efficient.
Here’s a slight simplification on it.
q: line (number of lines of it) of files ((unique value of maxima of (((substrings before ".txt" of Names of it) as Integer) of Files of it)) as string & ".txt") of Folders "__Global/RelayChain" of data folder of client
A: At 09:20:41 -0500 - S - s:1080572761(bes-root) - c:1615062694(SERVER-TEST1)
I also have some things to split it into properties:
// All Properties, as tuple string items
Q: (tuple string item 0 of it, following text of first " " of tuple string item 1 of it, tuple string item 2 of it, tuple string item 3 of it | "none", unique value of concatenation ";" of tuple string items whose (it starts with "r:") of it | "none", tuple string item (number of tuple string items of it - 1) of it ) of (tuple string of (name of it; substrings separated by " - " of lines (maximum of line numbers of lines of it) of it)) of files ((unique value of maxima of (((substrings before ".txt" of Names of it) as Integer) of Files of it)) as string & ".txt") of Folders "__Global/RelayChain" of data folder of client
A: 20210402.txt, 07:43:30 -0500, S, s:10566764(root-server), r:538926728(rop-level-relay);r:13805242(leaf-relay), c:3372983(client-name)
// Current Relay Chain
Q: tuple string of tuple string items whose (it starts with "r:" or it starts with "s:") of tuple string of substrings separated by " - " of lines (maximum of line numbers of lines of it) of files ((unique value of maxima of (((substrings before ".txt" of Names of it) as Integer) of Files of it)) as string & ".txt") of Folders "__Global/RelayChain" of data folder of client
A: s:10566764(root-server), r:538926728(top-level-relay), r:13805242(leaf-relay)
// Direct Parent Relay
Q: tuple string items (number of tuple string items of it - 1) of tuple string of tuple string items whose (it starts with "r:" or it starts with "s:") of tuple string of substrings separated by " - " of lines (maximum of line numbers of lines of it) of files ((unique value of maxima of (((substrings before ".txt" of Names of it) as Integer) of Files of it)) as string & ".txt") of Folders "__Global/RelayChain" of data folder of client
A: r:13805242(leaf-relay)
edit: Forgot to “generalize” the data folder of client path. No need to hard-code C:\Program Files (x86). Now it’ll work for BigFix client installed in non-default paths, and it’ll also work with Linux/UNIX/Mac client platforms.