How to? How do I get cd to change the current directory?

Dec 10, 2021
2
0
When I run the debugger:

cd D:

cd D:\Projects

echo %cd%


output

C:\Program Files\JPSoft\TCMD28

????
 
Apr 2, 2011
1,549
13
54
North Carolina, USA
This is a Windows "feature" - it keeps separate working directories for every drive.

If you want to change the drive AND directory, use CDD.

Or use:
CD / CHDIR - Display or change the current directory
/DChanges the current drive as well as directory. This option is included only for compatibility with the same option available in some versions of CMD. In most cases you should use CDD, which performs the same function.
 
  • Like
Reactions: Alpengreis

Similar threads