I have a script that will check if a file exists on a workstation. If I put the exact file name I am looking for it works fine, but if I put a wildcard for the file extension then the output is incorrect. I am trying to check if Office has been installed on workstations. The files are all named Icon.*.exe, where * is various things. I tested it on one file name without a star and put the entire file name (i.e. Icon.1AD45.098.111.exe) and the output was correct. When I change it to Icon.* the output is incorrect.
The output is simply if the Icon.* exists then output SUCCESS to a file, if it doesn't exist then output=FAIL. When I use the Icon.* I get FAIL everytime.
Is there a way in VBScript to use a wildcard to check if a file exists?