0

Possible Duplicate:
Using cd Command in Windows Command Line, Can't Navigate to D:\

After using diskpart to create T:\ I can't actually cd into T:\

When I try

cd T:\

It does NOTHING at all.

How can I fix this

Code for creating T:\

select disk 0

convert dynamic

create volume simple size=20480
rem create simple volume simple size=51200
assign letter=T
0

1 Answer 1

3

Make sure you're using the right syntax. As a leftover from MS-DOS times, changing drive and directory are two separate operations in the command-line shell.

For example, to go to T:\, you first change the drive to T:, then the directory to \:

T:
cd \

In Windows NT, the cmd.exe shell allows combining both operations again using the /d option:

cd /d T:\

A bit more detail. When you run cd T:\ as in your own example, it does change the directory, just not the drive. In MS-DOS and DOS-based versions of Windows, each drive letter had its own separate "current directory", as explained in this post.

Windows NT only has one "current directory" per process; however, the command shell and its cd command have to emulate the old behavior for compatibility reasons.

2
  • Does windows support any form of alias so I can make cd always use cd /d ? Dec 27, 2011 at 23:20
  • In batch files, no. In interactive shells, yes - using doskey. Also, you might find the pushd/popd command pair convenient; they don't require the separate steps. Dec 27, 2011 at 23:34

Not the answer you're looking for? Browse other questions tagged .