How do I change directory to the systemroot directory of the current main operating system via DOS?

1.6k views Asked by At

The title is pretty much self explanatory but I only want a simple CD (or CHDIR) dos command that will take me to the root directory of the current running operating system.

I make :

CD %windir%
CD ..

But I'm quite sure there is 1 simple command to execute this in more convenient way.

Thanks all!

1

There are 1 answers

2
Rolo On BEST ANSWER

Try this:

CD %SystemDrive%

or

CD %HOMEDRIVE%

UPDATE:

This will do the trick:

cd /D %SystemDrive%\

You can read the /D documentation if you execute "cd /?"