The basic command to move between folders

To change directories in Command Prompt, type cd followed by a space and the folder path you want to move to, then press Enter. For example, cd Documents moves you into the Documents folder. The folder must exist in your current location, or you need to type the full path from the root of your drive.

Command Prompt shows your current location at the start of each line. On Windows, it typically looks like C:\Users\YourName> or similar. After you run the cd command, that path updates to show where you are now. This visual feedback tells you whether the command worked and confirms your new location before you run the next command.

Key Takeaways

  • Type cd FolderName to enter a folder that exists in your current location.
  • Type cd .. to move up one level to the parent folder.
  • Type cd \ to jump to the root of your current drive (usually C:\).
  • Type the full path starting with the drive letter if you need to jump to a folder on a different part of your computer, like cd C:\Users\YourName\Documents\ProjectFolder.
  • If a folder name has spaces, wrap it in quotes: cd "My Documents".

Moving up to the parent folder

To go back up one level to the folder that contains your current folder, type cd .. (that is two periods with no space between them). Each time you run this command, you move up one level in the folder structure. This is useful when you have navigated several levels deep and want to back out without typing a full path.

If you are in C:\Users\YourName\Documents\Work\Projects and you type cd .., you move to C:\Users\YourName\Documents\Work. Type it again and you move to C:\Users\YourName\Documents. You can repeat this as many times as needed until you reach the folder you want.

Jumping to a specific folder using the full path

If the folder you want is not inside your current location, type the complete path from the drive letter. For example, cd C:\Users\YourName\Downloads\Reports takes you directly to the Reports folder inside Downloads, no matter where you are now. This method is faster than navigating step by step when you know exactly where you need to go.

You can also use this method to switch to a different drive. Type cd D:\Backups to move to the Backups folder on your D: drive. If you only type the drive letter followed by a colon, like D:, you switch to that drive but stay in whatever folder you were last in on that drive. The cd command with a full path handles both the drive switch and the folder navigation in one step.

Handling folder names with spaces

If a folder name contains spaces, you must wrap the entire path in double quotes. For example, cd "Program Files" enters the Program Files folder. Without the quotes, Command Prompt reads the space as the end of the command and tries to run "Program" as a separate instruction, which fails with an error message.

This applies to any part of the path that has spaces. cd "C:\Program Files\My Application" works correctly, but cd C:\Program Files\My Application does not. The quotes tell Command Prompt to treat the entire string, including spaces, as a single folder path rather than multiple separate commands.

Viewing what folders exist in your current location

Before you change directories, you may want to see what folders are available. Type dir and press Enter to list all files and folders in your current location. Folders appear with <DIR> next to their names, making them easy to spot among regular files.

Once you know the exact folder name, use the cd command to enter it. This prevents typos and confirms the folder exists before you try to navigate to it. The dir command is especially helpful when you are working in an unfamiliar part of your computer and need to see what options are available at each level.

Common mistakes and how to fix them

The most common error is typing a folder name that does not exist or misspelling it. Command Prompt responds with "The system cannot find the path specified." Check the spelling against the output of the dir command, and remember that folder names are case-insensitive on Windows but spaces must be in quotes.

Another mistake is forgetting the drive letter when jumping to a folder on a different drive. If you are on C: and type cd D:\Folder without first switching to the D: drive, it may not work as expected. Type the drive letter alone first (D:), then use cd to navigate within that drive. A third common issue is using backslashes incorrectly or mixing them with forward slashes in the middle of a path, though Command Prompt accepts both formats.

Frequently Asked Questions

What is the difference between cd .. and cd .?

cd .. (two periods) moves you up one level to the parent folder. cd . (one period) refers to your current folder and does nothing when you run it. The two-period version is what you need to go backward in the folder structure.

Can I use forward slashes instead of backslashes?

Yes. Command Prompt accepts both cd C:\Users\Documents and cd C:/Users/Documents. Forward slashes work the same way as backslashes on Windows, so use whichever you prefer or whichever is easier to type.

How do I get back to the root of my drive?

Type cd \ to jump to the root of your current drive, usually C:\. This is the highest level of the folder structure on that drive. From there, you can navigate into any folder using cd and the folder name.

What if I type a path that is too long?

Windows allows paths up to 260 characters by default, though this limit can be changed. If you hit the limit, you will see an error. In that case, navigate step by step using shorter paths, or enable long path support in Windows settings if you need to work with very deep folder structures.

How do I know if I typed the command correctly?

After you press Enter, the command prompt line updates to show your new location. If the path changed to what you expected, the command worked. If you see an error message or the path did not change, check your spelling and try again using the dir command to confirm the folder name.