Spaces in SETX PATH command
- by Jeremy Stein
Suppose my PATH is C:\WINDOWS\system32\;C:\Program Files\Important\
SET NEW_PATH=C:\My\Dir\
SETX PATH "%PATH%;%NEW_PATH%"
Results in a path of:
C:\WINDOWS\system32\;C:\Program Files\Important\;C:\My\Dir"
Notice the quotation mark at the end of the path. It's as though the backslash at the end of %NEW_PATH% escaped the final quote mark. I…