Windows x64 versions contain folders named with parenthesis like “\Program Files (x86)” and this breaks a batch file I use. An example of a problem line:
for %%c in (%path%) do if exist “%%c\xyz.exe” set xyz=OK
i.e. when it reaches “)” in “(x86)” it puts out an error message and exits…
Any ideas on how to fix this?
This is a rather large batch file, and atm I don’t have the time to rewrite it in a better language…
Many thanks 🙂
Doesn’t directly answer your question, but if you are trying to do what I thinking you are trying (which is make sure a file exists in the path) you can use something like the following in a batch file.