Forum Discussion
jimblye
Sep 14, 2023Copper Contributor
The where command is broken for directory names containing spaces.
I noticed that if a directory name contains spaces, and the directory is in the PATH, the where command is unable to find anything in that directory. For example, 7-zip is installed in C:\Program ...
lmstearn
Oct 13, 2024Brass Contributor
Looks broken, yes, does using https://stackoverflow.com/a/19159183/2128797 in the Path statement make a difference?
Using quotes gives a result here:
WHERE "C:\Program Files\7-zip\:7z"
With 8.3 names:
WHERE C:\Progra~1\7-zip\:7z
WHERE only lists files in the directory level specified, so is pretty restrictive without the /R option.
HTH 😀