CD command can't excute when path contains space #14653

Closed
opened 2026-01-31 04:15:58 +00:00 by claunia · 1 comment
Owner

Originally created by @hupo376787 on GitHub (Jul 23, 2021).

Windows Terminal version (or Windows build number)

19041.1110, 1.8.1521.0

Other Software

No response

Steps to reproduce

Cd to a directory contains space, such as C:\Program Files\.

Expected Behavior

Cd to C:\Program Files\

Actual Behavior

image

Originally created by @hupo376787 on GitHub (Jul 23, 2021). ### Windows Terminal version (or Windows build number) 19041.1110, 1.8.1521.0 ### Other Software _No response_ ### Steps to reproduce Cd to a directory contains space, such as `C:\Program Files\`. ### Expected Behavior Cd to `C:\Program Files\` ### Actual Behavior ![image](https://user-images.githubusercontent.com/14960168/126750206-48cfc323-b3c7-4ff1-bc25-9c01d904e200.png)
Author
Owner

@zadjii-msft commented on GitHub (Jul 23, 2021):

You need to wrap paths with spaces in quotes. Try:

cd "C:\Program Files\"
@zadjii-msft commented on GitHub (Jul 23, 2021): You need to wrap paths with spaces in quotes. Try: ``` cd "C:\Program Files\" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14653