File exists in $PATH

This should provide all of the folders of the PATH env var: (should be universal for all OSes) https://bigfix.me/relevance/details/3003684

(folders it) of unique values of (it as trimmed string) of substrings separated by (";";":") of values of (variables "PATH" of it; (if (windows of operating system) then (x64 variables "PATH" of it) else NOTHINGS) ) of environments

This is all files in PATH:

files of (folders it) of unique values of (it as trimmed string) of substrings separated by (";";":") of values of (variables "PATH" of it; (if (windows of operating system) then (x64 variables "PATH" of it) else NOTHINGS) ) of environments

This should be what you are looking for:

exists files "shuf" of (folders it) of unique values of (it as trimmed string) of substrings separated by (";";":") of values of (variables "PATH" of it; (if (windows of operating system) then (x64 variables "PATH" of it) else NOTHINGS) ) of environments

Reference: https://support.bigfix.com/inspectors/Environment%20Objects_Any.html

1 Like