This post will walk you through changing directories in the Windows 11 command prompt. Here’s how to change directories in the command prompt on the latest Windows OS.
What is a Directory?
In computers, a directory refers to a structured list of document files and folders that are usually created for organizational purposes. Its structure basically consists of a drive, directory and file.
There are two types of directories namely parent directory and subdirectory.
A parent directory refers to the main directory while the subdirectory is a separate directory under the main or parent directory.
In a more simplified definition, a directory refers to a location or path where certain files are stored. It’s just like a physical address for your residence.
Command Prompt Directory
Computers that are running on Windows OS do have a built-in program that emulates the input field in a text-based user interface screen with the Windows GUI (graphical user interface). This program is essential for executing commands and performing advanced administrative functions. And this program is called Command Prompt.
The Command Prompt has long been used in personal computers since the Microsoft Disk Operating System era.
Windows OS is designed for multitasking, multiuser and GUI-based operating systems while DOS is a single tasking, single user and is (command line interface) CLI-based operating system.
When Microsoft rolled out Windows OS, DOS was already embedded in the system. That being said, every Windows version does have a built-in command prompt for users to input and execute system commands.
Windows 11 Command Prompt Commands
The Windows Command Prompt gives you access to more than 280 commands for operating system tasks. Among the widely used commands include dir, call, cd, cls, cmd, bootcfg, bootsect, chdir, chkdsk and more.
Tackled in this post is one of these commands — the CD command.
What’s a CD command?
CD stands for Change Directory. The CD command is used to change the current directory in which the user is currently working (example, drive C: or D:).
With this command, you can navigate between different folders in your computer.
CD is a generic command that equates to the chdir command found inside the Windows Command Processor.
C:\Users>cd public [enter]
Syntax to change the working directory to another drive (example from drive C: to drive D:).
cd /d [path]
C:\Users>cd /d D: [enter]
The last command switches the current drive (C:) to another drive (D:). Drive letters can also be renamed.
Steps to Change Directories in Command Prompt Windows 11
The following steps will change the current drive (C:) to another drive (D:) using the Windows 11 command prompt app.
Step 1: Open the Command Prompt app.
To get started, open the Command Prompt. To do this, simply click on the Windows/Start icon on the Taskbar at the bottom center of the desktop.
Step 2: Type cmd in Start Search.
On the Start search box, type cmd then select Command Prompt app under Best search match.
Step 3: Run Command Prompt (CMD) App As Admin.
On the right pane, click the option to Run as administrator then click Yes on the pop-up message to confirm.
NOTE: Running the app as admin grants the app special or full permissions to access restricted parts of the Windows 11 system. Thus, the Command Prompt app should have an Administrator label on its title (Administrator: Command Prompt).
On the command prompt window, you’ll see nothing but a black text-based interface with a blinking cursor.
Step 4: Exit directories to return to the main drive.
The directory or prompt is the current directory in use. If you want to exit and go back to the main drive, then simply type cd\ then press Enter on the keyboard.
The output should be like this:
Step 5: Enter New Drive to access.
To switch to another directory like drive D:, just type this command line:
D: then press Enter on the keyboard.
The output should be like this:
This means that the current/active directory in use is already drive D.
Step 6: Switch back to the previous drive.
To change it back to drive C:, just type this:
C: then press Enter on the keyboard.
The output directory will then return to drive C, as follows:
Step 7: Access a certain folder in another drive.
To switch to a certain folder in another drive, just indicate the complete path or directory. For example from drive D to C:\Windows, just type this command:
cd /d C:\Windows then press Enter on the keyboard.
The output directory should be C:\Windows>.
Repeat the same steps to switch to another storage drive.
Should you wish to view the files and folders inside a certain directory or drive, you will need to use the command called DIR.
Other Ways to Open Command Prompt (CMD)
A. Via Windows/Start Menu
Alternatively, you can open the Command Prompt (CMD) in Windows 11 through the Windows Start menu. Just follow these steps:
- To get started, right-click on the Windows icon on the taskbar then click Windows Terminal (Admin) from the menu options.
That will launch the Command Prompt app in Administrator mode.
While in the Windows PowerShell window, just type CD [parameters] to switch to another drive or directory.
B. Via Windows Shortcuts
The Windows 11 OS also lets you execute various shortcut commands and keys to access or launch certain apps and files in the system. One of these is the Win + X key combos. To open Command Prompt (CMD) app with this shortcut key, just follow these steps:
- Press both the Windows + X keys on the keyboard to launch the Start menu and then select Command Prompt (Admin) from the given items.
That will route you straight to the Windows PowerShell or Command Prompt window where you can input and execute necessary system commands.
Other ways to open command prompt in Windows 11 are through the Run app, Task Manager, Address Bar, Context Menu, and File Explorer.
You may also opt to create a desktop shortcut for the Windows PowerShell using the cmd.exe file.
Once you’re in the Windows PowerShell or Command Prompt screen, you can start using the CD command.
Hope this helps!
Please visit our YouTube channel to view different troubleshooting and tutorial videos that might be helpful to you.
You Might Also Want To Read: