cd to a different Drive doesnt work properly in cmd #4418

Closed
opened 2026-01-30 23:47:19 +00:00 by claunia · 2 comments
Owner

Originally created by @OmegaRogue on GitHub (Oct 12, 2019).

#Environment

Windows build number: Microsoft Windows [Version 10.0.18362.10022]
Windows Terminal version (if applicable): 0.5.2762.0


Steps to reproduce

Two Different Outcomes:

1.: cd D:
2.: cd D:\

Expected behavior

1 and 2: It changes the current directory to D:\

Actual behavior

1.: It prints D:
image

2.: It prints an empty line
image

#Note
This seems to be an issue with cmd.exe itself, as seen here with cmd.exe:
image

In Powershell cd D: and cd D:\ work fine:
image

Originally created by @OmegaRogue on GitHub (Oct 12, 2019). #Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.10022] Windows Terminal version (if applicable): 0.5.2762.0 ``` # Steps to reproduce Two Different Outcomes: 1.: cd D: 2.: cd D:\ # Expected behavior 1 and 2: It changes the current directory to D:\ # Actual behavior 1.: It prints D:\ ![image](https://user-images.githubusercontent.com/24958536/66702986-dc6d0200-ed0d-11e9-8c02-a1ff83ba2335.png) 2.: It prints an empty line ![image](https://user-images.githubusercontent.com/24958536/66702994-e989f100-ed0d-11e9-93cf-78c6ed32fc43.png) #Note This seems to be an issue with cmd.exe itself, as seen here with cmd.exe: ![image](https://user-images.githubusercontent.com/24958536/66703001-fe668480-ed0d-11e9-9086-db541e978152.png) In Powershell `cd D:` and `cd D:\` work fine: ![image](https://user-images.githubusercontent.com/24958536/66703016-2b1a9c00-ed0e-11e9-81a1-a7c0ffcda7ba.png)
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-30 23:47:19 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 12, 2019):

Yep! This is just by design for CMD. It keeps a different working directory for each drive, so you could do something like this:

CD C:\Users\Me\Pictures
CD A:\DCIM100
COPY A:img_1234.jpg C:

To switch “drives” in CMD, just enter the name of the drive (like A:)

@DHowett-MSFT commented on GitHub (Oct 12, 2019): Yep! This is just by design for CMD. It keeps a different working directory for each drive, so you could do something like this: ``` CD C:\Users\Me\Pictures CD A:\DCIM100 COPY A:img_1234.jpg C: ``` To switch “drives” in CMD, just enter the name of the drive (like `A:`)
Author
Owner

@OmegaRogue commented on GitHub (Oct 12, 2019):

Ok, I didn't know that, i used to start cmd via the context menu where i needed it

@OmegaRogue commented on GitHub (Oct 12, 2019): Ok, I didn't know that, i used to start cmd via the context menu where i needed it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4418