I have following batch:
subst D: /d
subst D: C:\folder\folder2
pause
And it works fine.
So I tried something different:
set p2=folder2
set p1=C:\folder\%p2%
subst D: /d
subst D: %p1%
pause
Although when run in console they both look exactly the same, the second version results in error:
subst is not found as internal or external command
Any ideas?