The Basic Command to Move Between Folders

To change directories in Windows PowerShell, type cd followed by a space and the path to the folder you want to open. For example, cd C:\Users\YourName\Documents moves you into your Documents folder. Press Enter, and PowerShell displays your new location in the command prompt.

PowerShell reads the path exactly as you type it, so accuracy matters. If the folder name contains spaces, wrap the entire path in quotation marks: cd "C:\Program Files\MyFolder". Without quotes, PowerShell stops reading at the first space and returns an error.

You can also use a shorter form if you are already inside a parent folder. If you are in C:\Users\YourName and want to enter the Documents subfolder, type cd Documents instead of the full path.

Key Takeaways

  • The cd command moves you into a different folder; type cd, a space, and the folder path, then press Enter.
  • Wrap folder paths in quotation marks if the name contains spaces, such as cd "C:\Program Files\Folder".
  • Use cd .. to move up one level to the parent folder, or cd \ to jump to the root of your current drive.
  • Type pwd to see your current location, and dir to list the folders and files in the current directory.
  • Tab completion fills in folder names automatically—type the first few letters and press Tab to let PowerShell finish the name.

Moving Up to Parent Folders

To move up one level to the parent folder, type cd .. (cd followed by two periods). If you are in C:\Users\YourName\Documents\Work, typing cd .. takes you to C:\Users\YourName\Documents.

You can chain multiple levels by typing cd ..\.. to move up two folders at once, or cd ..\..\.. for three levels. This is faster than running the command multiple times.

To jump directly to the root of your current drive (usually C:\), type cd \. This works from any folder on that drive.

Using Tab Completion to Fill in Folder Names

PowerShell includes a feature called tab completion that saves typing. Start typing a folder name and press the Tab key—PowerShell automatically fills in the rest of the name if it finds a match. If multiple folders start with the same letters, pressing Tab cycles through them one at a time.

For example, type cd Doc and press Tab. If Documents is the only folder starting with "Doc" in your current location, PowerShell completes it to cd Documents. This is especially useful for long folder names or paths with many characters.

If tab completion does not work, the folder name may not exist in your current location, or you may have misspelled the beginning. Check your spelling and try again.

Checking Your Current Location and Listing Folder Contents

To see which folder you are currently in, type pwd (print working directory) and press Enter. PowerShell displays the full path of your current location. This is helpful when you have navigated through several folders and need to confirm where you are.

To see what folders and files are inside your current directory, type dir and press Enter. PowerShell lists everything in that folder, showing the name, size, and date modified for each item. Folders are marked with <DIR> to distinguish them from files.

You can also type ls instead of dir—both commands do the same thing in PowerShell. The ls command comes from Unix-style systems and works in modern versions of PowerShell.

Changing to a Different Drive

If your computer has multiple drives (such as C:, D:, or E:), you can switch between them by typing the drive letter followed by a colon. For example, type D: and press Enter to move to your D drive. PowerShell then shows your location on that drive.

You can combine a drive change with a directory change in one command. Type cd D:\Backups to move to the Backups folder on your D drive in a single step. If you are on the C drive and type only D:, PowerShell switches to the D drive but stays in whatever folder you were last in on that drive.

Common Mistakes and How to Fix Them

The most frequent error is forgetting quotation marks around paths with spaces. If you type cd C:\Program Files\Folder without quotes, PowerShell reads only C:\Program and returns an error saying the path does not exist. Always use quotes: cd "C:\Program Files\Folder".

Another common mistake is typing the path incorrectly. PowerShell is case-insensitive for folder names on Windows, but it is strict about spelling and backslashes. If you type cd C:/Users/YourName with forward slashes instead of backslashes, PowerShell returns an error. Use backslashes: cd C:\Users\YourName.

If you see an error saying "The term 'cd' is not recognized," you may be using Command Prompt instead of PowerShell. Open PowerShell directly by searching for "PowerShell" in the Windows Start menu, or right-click in a folder and select "Open PowerShell window here."

Using Full Paths vs. Relative Paths

A full path starts from the root of your drive and includes every folder in the chain, such as C:\Users\YourName\Documents\Work. A relative path is shorter and assumes you are starting from your current location, such as Documents\Work if you are already in C:\Users\YourName.

Full paths work from anywhere—you can type them no matter which folder you are currently in. Relative paths are faster to type when you are navigating nearby folders, but they only work if the folder exists relative to where you are standing. If you are in C:\ and type cd Documents, PowerShell looks for C:\Documents, not your user Documents folder.

When in doubt, use the full path. It is more reliable and prevents confusion about which folder you are trying to reach.

Frequently Asked Questions

How do I go back to the folder I was just in?

PowerShell does not have a built-in "back" command like a file browser, but you can type cd - to return to the previous directory. This works only once—typing it again takes you back to where you were before that. For frequent navigation, keep the full path written down or use tab completion to move between folders quickly.

Can I open a folder in File Explorer from PowerShell?

Yes. Type explorer . (explorer followed by a space and a period) to open File Explorer at your current PowerShell location. The period represents "current directory." You can also type explorer C:\path\to\folder to open any folder directly.

What if the folder path is very long and hard to type?

Use tab completion—type the first few letters of each folder name and press Tab to let PowerShell finish it. You can also copy the full path from File Explorer, paste it into PowerShell with quotation marks around it, and press Enter. This is faster and more accurate than typing a long path by hand.

Does PowerShell remember where I was if I close and reopen it?

No. When you close PowerShell, it forgets your location and opens at the default folder (usually your user home directory). If you need to return to a specific folder frequently, create a shortcut or save the path in a text file for quick reference.