I need to write a command that changes the current directory and prints a NEW directory wrapped in some tags. I thought I would cd SOMEPATH & echo wkd%cd%wkddo it, but there will be a problem.
Here is an example of input and output
C:\Users> cd .. & echo wkd%cd%wkd
wkdC:\Userswkd
As you can see, the OLD directory was printed. Why is this happening? I also tried using newlines (since I feed the command, although an external program), but this creates problems when starting the command line software.
I really hope there is a solution for this.
user3018710
source
share