I’m trying to search for a file that could exist in any of the folders under the PATH environment variable. I have come up with the following relevance clauses to:
but when I combine these two clauses to search all of the folders of the PATH variable, I don’t get the expected TRUE result:
q: exists file “devcon.exe” of folders (("%22" & (concatenation “%22;%22” of (substrings separated by “;” of value of variable “PATH” of environment)) & “%22”) as string)
A: False
What am I doing wrong here, and how can I search these multiple folders from the PATH variable?
While I am sure there is a way to get that working, searching for files in folders is “expensive” in terms of how much time the agent has to put into it. Since the file is only 78k, it might be easier to just download it to the system folder and after that check for its existence there. That way you know where it is and you know it will be in the PATH statement. Just a suggestion…keeps it nice and simple.
operator is able to work with the substrings without extra quotes being added. What you were doing made sense, but ended up being more than was needed.