Vipin
Vipin

Reputation: 67

I am unable to change the directory in cmd

cmd is not able to change the directory using the command

C:\Windows\system32>CD I:

It is going back to same C: directory

The screenshot enter image description here

Upvotes: 2

Views: 6728

Answers (3)

John Slegers
John Slegers

Reputation: 47081

The short answer

The correct commando to go from C:\Windows\system32 to I:\, is this :

cd /d i:\

More details

If you're somewhere random on your I:\ drive, and you want to go to the root of your drive, you can use this command :

cd i:\

If you're somewhere random on your I:\ drive, and you want to go to a specific folder on your drive, you can use this command :

cd i:\path\to\my\folder

If you're on a different drive, and you want to go to the root of your I:\ drive, you can use this command :

cd /d i:\

If you're on a different drive, and you want to go to a specific folder on your I: drive, you can use this command :

cd /d i:\path\to\my\folder

If you're on a different drive, and you want to go to the last open folder of you I: drive, you can use this command :

cd /d i:

As a shorthand for cd /d i:, you can also use this command :

i:

Upvotes: 2

user6811411
user6811411

Reputation:

Read cd /? to learn there is a /d switch to change drive and directory at the same time

Keep in mind that a

cd I:\

would have an effect even if the current drive would not change .

An alternative would be

pushd "I:\"

which stores the current location on a stack and can be recalled lateron with

popd

Upvotes: 0

Calaris
Calaris

Reputation: 158

Just type "I:" and press Enter, then use "CD foldername" to dive into your folders.

Upvotes: 3

Related Questions