CD (or ChDir) fails in my batch files when used with variables.
I want my batch files to use variables to navigate the directory structure relative to a top directory which may change from run to run.
I have the following simplified example:
The following line fails ( Error is: The system cannot find the path specified):
To solve this, I tried all combinations I could think of of %, single-quotes, double-quotes - no success.
When I type the command interactively at the C:\ prompt(C:\ CD then the actual path in V_WorkDir), it works fine.
I have already made sure there are NO spaces or strange characters in V_WorkDir, and yes, MySubDir exists as a sub-directory.
What am I doing wrong?
Can this be done? How?
Thanks for any help you can provide.