Как в командной строке перейти на диск с windows system32

Download Article

A comprehensive Guide to Changing Directories in the Windows Command Prompt

Download Article

  • Opening Command Prompt
  • |

  • Changing the Directory
  • |

  • Other Directory Commands
  • |

  • Troubleshooting
  • |

  • Q&A
  • |

  • Tips
  • |

  • Warnings

Do you want to know how to change directories in the Windows Command Prompt (CMD)? The Windows Command Prompt allows you to use a variety of advanced commands that give you more control over your computer. However, when learning to use the Command Prompt, you will need to learn some basic commands, including how to navigate by changing directories. A directory is just another name for a folder. This wikiHow teaches you how to change directories in the Windows Command Prompt. To make changes in Command Prompt, you must be using an administrator account.

How to Change Directory in CMD: Quick Steps

In Command Prompt (CMD), type «cd» with a space after it, followed by the name of the directory (or drag and drop the directory into CMD from File Explorer). Then press «Enter.»

  1. Step 1 Open the Windows Start menu icon.

    To do so, click the icon with the Windows logo in the taskbar at the bottom of the screen. Alternatively, you can press the Windows key.

    • For Windows 8, place your mouse cursor in the top-right corner of the screen, then click the magnifying glass icon when it appears.
  2. Step 2 Type in cmd.

    This will bring up the Command Prompt icon at the top of the Start window.

    Advertisement

  3. Step 3 Right-click Command Prompt icon.

    It resembles a black box with a white cursor. This displays a drop-down menu.

  4. Step 4 Click Run as administrator.

    It’s near the top of the drop-down menu. Doing so will open the Command Prompt with administrator privileges.

    • Confirm this choice by clicking Yes when prompted.
    • You won’t be able to run Command Prompt in administrator mode if you are not signed into an Administrative account, or if you’re on a restricted, public, or networked computer (e.g., a library or school computer).
  5. Advertisement

  1. Step 1 Type in cd  followed by a space.

    This command, which stands for «change directory», is the root of any directory change.

    • Don’t press the «Enter» key just yet.
    • Alternatively, you can type chdir. This command does the exact same thing as «cd.»[1]
  2. Step 2 Determine your directory's path.

    A directory path is like a map to a specific folder. For example, if the directory to which you want to change is the «System32» folder that’s, in the «Windows» folder on the hard drive, the path would be «C:\Windows\System32\.»

    • You can find a folder by navigating to it in File Explorer. Click the address bar at the top to display the path to the folder you are currently in.
    • You can display a list of all directories in your current directory in the Command Prompt by typing dir and pressing «Enter
  3. Step 3 Type in your directory's path.

    Your command or address goes after the «cd» command; make sure there is a space between «cd» and your command.

    • For example, your whole command might look like cd Windows\System32.
    • Alternatively, you can drag and drop a folder from File Explorer into the Command Prompt.
    • If the directory is in the current drive you are in, you do not need to type the drive letter at the beginning of the path.
  4. Step 4 Press ↵ Enter.

    Doing so will change the Command Prompt directory to your selected one. The current directory you are in is listed next to the text cursor (i.e. «C:\Windows\System32>».)

  5. Advertisement

  1. Step 1 Type cd..

    and press Enter to go back a directory. If you want to go back one directory (i.e. change from «C:\Windows\System32» to «C:\Windows»), simply type «cd..» with two periods and press «Enter

  2. Step 2 Type cd\ and press ↵ Enter to return to the root of your drive.

    If you want to go back to the root of your drive (i.e. go from «C:\Windows\System32» to «C:\»), simply type «cd\» with a back slash and press «Enter

  3. Step 3 Type a drive letter and press ↵ Enter to change drives.

    If you try using the «cd» command to change directories to a directory that is on another drive, you will notice it does not work. You need to change drives before changing to a directory on that drive. To do so, type the drive letter (i.e. «D:») with a colon and press «Enter» to change drives.

    • Alternatively, you can type cd /d followed by the complete path (including the drive letter) of a directory on another drive to change directly to that drive (i.e. «cd /d D:\Documents».)
  4. Step 4 Type dir and press ↵ Enter to list directories in your current directory.

    If you are not sure what directories are in your current directory, you can display a list of all the directories by typing «dir» and pressing «Enter

  5. Advertisement

  1. Step 1 Check that you are spelling the directory name correctly.

    If you receive an error message that says «The system cannot find the path specified,» check to make sure you are spelling the name of the directory correctly. You can see a list of all directories in your current directory by typing dir and pressing «Enter

  2. Step 2 Check to make sure the directory exists.

    If you are spelling is correct and you are still getting the same error, open File Explorer and check to make sure the directory you are navigating to actually exists and that it’s located where you think it’s located.

    • If the directory does not exist, you can create a new directory by typing mkdir followed by a space, followed by the name of the directory you want to create. Then press «Enter
  3. Step 3 Make sure the directory is located on the drive that you are currently in.

    The «cd» command will not allow you to change to a directory on another drive. If you are currently in the «C:» drive, but the directory you want to change to is on the «D:» drive, you will need to change drive letters before changing to a new directly. You can do so by typing the drive letter and pressing «Enter

  4. Step 4 Make sure you are running the Command Prompt as an administrator.

    If you are not running the Command Prompt as an administrator, you will be limited in what you can do with the Command Prompt. Make sure you are logged into Windows as an Administrator, then right-click the CMD icon in the Start menu and click Run as Administrator.

  5. Advertisement

Add New Question

  • Question

    How do I go to C:\ from C:\users\username?

    You can either type «cd ..» to take you up a directory level (to C:\users) and once again to take you to the root level, or you can always type «cd \» from any directory to take you to the root level.

  • Question

    How do I change the name of a drive, like from Drive H: to drive A:?

    In start, type Computer Management. Open Computer Management and click the arrow next to Storage, then Disk Management. Right-click the drive you want to rename and click Change Drive Letter.

  • Question

    What is the difference between cd\ and cd?

    In order to use cd you have to put a file path after it; cd\ just goes straight to C:\.

See more answers

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

  • Changing the directory is useful when attempting to modify or delete a file in a specific location.

Thanks for submitting a tip for review!

Advertisement

  • Attempting to run a command that is contingent on a specific file or folder while in a different directory will result in errors.

Advertisement

About This Article

Thanks to all authors for creating a page that has been read 2,971,021 times.

Is this article up to date?

In this article, let’s learn how to navigate through directories in Command PromptThe Command Prompt (CMD) in Windows is a powerful tool for executing commands, managing files, and navigating your system. One of the most common tasks you’ll perform in CMD is changing directories, which allows you to move between folders to access and manage files. Whether you’re a beginner or an experienced user, knowing how to change directories in Command Prompt is essential for effective system navigation.

This guide will walk you through the step-by-step process of changing directories in Windows 11 and Windows 10 using basic commands like cd (change directory) and dir (list contents), along with helpful tips to make your file management easier. Whether you’re navigating through your system’s folders, opening a project folder, or accessing a specific directory for troubleshooting, changing directories is a fundamental task in CMD.

How-to-Change-Directories-in-CMD

Change Directories in Command Prompt

Understanding Directories in Windows

When working with Windows, you’ve likely encountered the term «directory.» But what exactly is a directory in Windows? In this article, we’ll delve into the world of directories, exploring their definition, types, and importance in the Windows operating system.

What is a Directory in Windows?

A directory, also known as a folder, is a container used to store and organize files and subdirectories on a computer. It’s a way to categorize and structure your files, making it easier to locate and access them. Think of a directory as a physical file folder, where you can store related documents, images, or other files.

Types of Directories in Windows

  1. Root Directory: The root directory, denoted by a backslash (), is the topmost directory on a hard drive or storage device. It contains all other directories and files.
  2. Subdirectories: Subdirectories are directories within directories. They help further organize files and can be nested multiple levels deep.
  3. System Directories: System directories, such as Windows, System32, and Program Files, are created by the operating system and contain essential files and programs.
  4. User Directories: User directories, such as Documents, Pictures, Music, and Videos, are created by the operating system for each user account. They serve as default locations for storing personal files.
  5. Program Directories: Program directories, such as Program Files (x86) and Program Files, contain installed applications and their associated files.
  6. Temporary Directories: Temporary directories, such as Temp and %temp%, store temporary files created by applications and the operating system.
  7. System Volume Information: The System Volume Information directory contains system files, such as restore points and indexing data.
  8. Recycle Bin: The Recycle Bin is a special directory that stores deleted files until they are permanently erased or restored.
  9. Hidden Directories: Hidden directories, such as AppData and Local Settings, contain configuration files and data used by applications and the operating system. They are hidden by default to prevent accidental modification or deletion.
  10. Network Directories: Network directories, such as shared folders and network drives, provide access to files and resources on other computers or devices over a network.
  11. Virtual Directories: Virtual directories, such as those created by subst or mklink commands, are symbolic links that map a directory to a different location on the same or another drive.
  12. Mount Points: Mount points are directories that serve as entry points for mounted volumes, such as USB drives or network shares.
  13. Reparse Points: Reparse points are directories that contain reparse data, which allows the operating system to redirect file system requests to a different location.
  14. Junction Points: Junction points are directories that link to another directory on the same volume, allowing multiple paths to access the same files.
  15. Symbolic Links: Symbolic links are directories that link to a file or directory on the same or another volume, allowing multiple paths to access the same file or directory.

How to Change Directories in CMD at Different Levels (With Examples)

Before moving ahead with Changing Directories to Windows Folders, we have to understand Directory Changing to Different Levels. Let us discuss all the methods for Changing Directories in CMD at different levels in Windows 10 or 11.

1. Root Level Directory

Open Command Prompt to change to a directory in the root directory (such as»C:\» on Windows), you can use the `cd` command followed by the directory name.

Example:

Root-Directory

Changing Directories in the Root Directory

2. Parent Level Directory

Open Command Prompt to move to a directory within the parent directory (like going from «Documents» to «Users»), simply use the `cd` command followed by `..` to go up one level, and then the name of the parent directory.

Example:

Parent-Directory

Changing Directories in the Parent Directory

3. Subdirectories Level Directory

Open CMD or Command Prompt to enter a subdirectory within your current directory (such as going from «Documents» to «Photos»), use the `cd` command followed by the name of the subdirectory.

Example:

Subdirectories

Changing Directories to Subdirectories

4. Nested Subdirectories Level

Open CMD to navigate to a deeply nested subdirectory (like going from «Documents» to «Work > Projects»), use the `cd` command with each subdirectory name, separated by a backslash (\).

Example:

Nested-Subdirectories

Changing Directories in Nested Subdirectories

5. Leaf Level Directory

Open Command Prompt in Windows 10 or 11 to enter a directory that doesn’t contain any subdirectories (like going to a folder with just files), use the `cd` command followed by the leaf directory’s name.

Example:

Leaf-Directories

Changing Directories to Leaf Directories

Note: Remember, you can always type `cd ..` to go up one level and explore different directories easily.

Changing Directories in Command Prompt to Different Folders

Now, after discussing Directory Change in Different Levels, we will discuss all the possible methods that are required to Change Directories to Folders in the Windows Command Line Tool.

Method 1: Using Drag and Drop

For those who prefer a graphical approach, changing directories using drag and drop is simple. You can open File Explorer, locate the desired directory, and drag it to the Command Prompt window. This action automatically populates the Command Line with the directory path.

Drag-and-Drop

Change Directories Using Drag and Drop

Method 2: Using Commands

Changing directories using commands may seem tricky at first, but it’s essential to get the hang of it in Command Prompt. Here are some easy methods to do it:

1. Absolute Paths

This is like using a full address to find a place. In Command Prompt, you can use the full path to a folder to get there directly. This will take you straight to your «Documents» folder. For instance:

absolute-path

absolute-path

2. Relative Paths

Think of this as giving directions from where you are. You can use `..` to move up one level and the folder name to go into a subfolder. This will take you up one level from where you are right now. For example:

Relative-path

using Relative Paths

3. Drive Letters

Imagine switching between different drives as changing streets. To switch to a different drive, just type its letter and a colon. This will take you to the D: drive. For example:

Drive-letter

using Drive Paths

4. Environment Variables

These are like shortcuts to important places. You can use names like `%USERPROFILE%` to go to common folders without typing the whole path. This will take you to your user profile folder. For example:

Environment-Variables

using Environment Variable

5. Tab Auto-Completion

Think of this as your Command Prompt assistant. When you start typing a folder name and press Tab, Command Prompt will try to finish it for you. If there’s more than one option, it will show you a list.

6. Previous Directory (`cd ..`)

This is like having a «go back» button. If you want to return to the folder you were in before, just type `cd ..`. It’s like a quick way to backtrack.

7. Using Wildcards

Wildcards are like search filters. You can use `*` to find folders based on patterns. This will take you to a folder with a name starting with «sep». For example:

wildcard1

Using Wildcards
cd C:\Users\GFG0338\Desktop\mystuff\my_Sep_Doc>dir sep*.*

8. Using the «dir» command

It lists all Windows Files and Directories (folders) in the current directories. This helps the users to quickly see what Files and Directories are present in a particular location

For example, if you want to list the content of » C:\Users\GFG0338\Desktop\mystuff\my_Doc «, you would type the following:

dir-command

using dir Command

This will give you a list of Files and Directories in that folder along with respective attributes.

How to Navigate to a Folder in Command Prompt

When you want to navigate to a different folder in the Command Prompt, it’s like giving your computer directions. Here’s how to do it in simple steps:

  1. Open Command Prompt: First, you need to open Command Prompt in Windows 10 or 11. You can do this by pressing the Windows key, typing «Command Prompt,» and hitting Enter.
  2. Understand Your Starting Point: Before you start, it’s good to know where you are. Command Prompt opens in a default location, usually your user folder.
  3. Type ‘cd’ and Space: To tell Command Prompt you want to change the folder, type `cd` (which stands for «change directory») followed by a space.
  4. Enter the Folder Name: Now, type the name of the folder you want to go to. If your folder name has spaces, put it in double-quotes. For example, if you want to go to a folder named «My Stuff,» you’d type: cd «My Stuff»
  5. Hit Enter: Press the Enter key on your keyboard. This tells Command Prompt to follow your directions and take you to the folder.
  6. Check Your Location: To make sure you’re in the right place, you can type `cd` without any folder name and press Enter. Command Prompt will show you the full path of where you are.

Note: Remember, you can always use the `cd ..` command to go up one level if you ever want to backtrack.

Tips for Navigating Directories in Command Prompt

Below we have highlighted a few tips and tricks to make directory navigation in the Command Prompt much easier, let’s check them out:

1. The dir Command

The dir command is being used in CMD to list down all the files and directories in the current folder, here’s a quick example for this:

Example:

dir

2. The cd .. Command

The cd .. command helps in navigating back to the previous directory instantly, here’s a quick example for this:

Example:

cd ..

3. Drag & Drop

You can also choose to simply drag a folder from File Explorer into the Command Prompt. This woll automatically insert the entire path of that directory into CMD.

Tips and Tricks while Changing Directory

There could be five possible reasons if you’re unable to change directory in CMD (command prompt). Let’s identify them in segregated format:

1. Incorrect Syntax

If you are not using the correct command, it might led to throw Syntax error. For example, 

cd C:\Path\To\Directory (no quotes unless the path contains spaces)

2. Permission Issues

Since, normal users have the limited access so there are high chances that you might not beable to access to certain directories. So, it’s recommended to run CMD as an administrator.

3. Non-Existent Directory

Sometimes, we do try to access to a certain directory that might not exist. So, it’s better to verify the path using dir to list down all the available directories.

4. Special Characters or Spaces

If the path contains spaces or special characters, enclose the path in double quotes, For example,

cd "C:\My Folder"

5. Drive Mismatch

If you’re trying to change to a directory on a different drive, make sure to switch drives first by typing the drive letter. For example D: before using cd.

D: cd

Best Practices for Directory Management

To ensure efficient directory management, follow these best practices:

  • Use Clear and Concise Names: Use descriptive names for directories and files to facilitate easy identification.
  • Avoid Deep Nesting: Limit the number of subdirectories within directories to prevent confusion and disorganization.
  • Regularly Clean Up Directories: Periodically review and remove unnecessary files and directories to maintain a clutter-free file system.

Conclusion

Changing directories in Command Prompt is an important skill that simplifies file system navigation and task management. Whether you’re working with relative paths, absolute paths, or switching between drives, mastering these commands ensures a smoother and more efficient CMD experience.

Also Read

  • Most Useful CMD Commands in Windows
  • 10 Ways to Open the Command Prompt in Windows 10
  • How to Change Colours in Command Prompt in Windows?

As you use Windows, there are times you will need to execute commands in the Command Prompt (CMD) to perform certain tasks. There are commands that will only work when they are executed in the right directory. This short guide will show you how to change the directory or drive in CMD on Windows 11.

The commands to change directory or drive can also be used in the Windows Terminal (a new command-line tools and shells similar to CMD) in Windows 11.

Change directory or drive in Command Prompt

In Command Prompt, you can use the CD command to change the current directory to any other directory you want. This is provided if you have access to the directory and if the directory you want to change to does exist.

For example, the command below will change the current directory to “C:\test” in CMD.

cd C:\test

How to change directory in CMD Windows 11

If the directory or path name contains spaces, it’s recommended to use quotes around the directory. For example, the command below will change the directory to “C:\New folder” in CMD.

cd "C:\New Folder"

Use quotes for path name in CMD

To change the current directory to a different drive in CMD, simply enter the drive letter. For example, the command below will change to D: drive.

d:

Change directory to another drive in CMD

Tip: To view a list of all folders (sub-directories) in the current directory in CMD, enter “dir” in Command Prompt.

dir

How to view folders in current directory in CMD

Can’t change directory in CMD

If the CD command does not work to change directory or drive in CMD, it is because CD is usually used for changing directory in the same drive. If you want to change the directory to a different drive, for example, from C: to D: drive, just type D: in the command prompt.

D:

Change directory to another drive in CMD

After changing the drive, you can then continue using the CD command to change the directory in that drive in CMD.

Alternatively, you can force use CD with a switch “/d” to tell the command prompt you are switching to another drive using the CD command. For example, the command below will change from any directory or drive to “D:\folder\sample” using CD command.

cd /d d:\folder\sample

How to change drive in CMD Windows 11

The system cannot find the path specified error in CMD

Note that if the directory you are changing to does not exist, command prompt will return an error that says “The system cannot find the path specified“. Check the path name and try again.

The system cannot find the path specified CMD Windows 11

Unable to change directory in CMD because “Access is denied”

If you receive the “Access is denied” error when you try to CD to a directory, it means that you do not have the privileges required to access the folder or directory. If you are an administrator in the system and you do own the folder, take ownership of the folder and try again. Read: How to Take Ownership of a File, Folder or Drive in Windows 11.

Access is denied CMD

Change default directory in CMD on Windows 11

By default, if you open Command Prompt from the Start menu or Run window, it will usually open in your Windows profile directory which is something like C:\users\alvin. Or, if you run CMD as administrator, it will always start in C:\Windows\system32.

There is no setting that allows you to change the default directory if you start CMD from Start or Run. However, there is a workaround to force CMD to start in any directory you want it to. You can create a shortcut pointing to cmd.exe and configure the Start in field to any directory you want the command prompt to start in. Here’s how to do it.

First, right-click anywhere on the desktop and select New > Shortcut to create a shortcut.

Create desktop shortcut Windows 11

In the Create Shortcut wizard, enter the path to cmd.exe, in most cases, it should be in “C:\WINDOWS\system32\cmd.exe“. Change the C: drive if your Windows is installed on a different drive. Click Next to continue. Give your shortcut any name you like and click Finish to complete the wizard.

Create shortcut for CMD Windows 11

Next, right-click the newly created shortcut and select Properties. Then, go to the Shortcut tab. In the Start in field, enter the default directory where you want CMD to start in when you open this shortcut. Click OK to save the changes.

Change default directory in CMD Windows 11

Whenever you open CMD through this shortcut, Command Prompt will automatically start in the directory you’ve entered in the “Start in” field earlier.

Start CMD in another drive or directory Windows 11

All Windows-related issues might be solved with a program named Command Prompt (CMD). You can feed the Command Prompt with executable commands to perform various administrative functions. For example, the cd or change directory command is used to change the directory path where you are working currently. For instance, the command cd\windows\system32 will switch the directory path to the System32 subfolder within the Windows folder. The Windows cd command is also called chdir, and it can be employed in both, shell scripts and batch files. In this article, you will learn how to change the directory in CMD on Windows 10.

How to Change Directory in CMD on Windows 10

Table of Contents

What are Windows CWD and CD Command?

The Current Working Directory abbreviated as CWD is the path where the shell is currently working. The CWD is mandatory to retain its relative paths. The command interpreter of your Operating System holds a generic command called cd command Windows.

Type the command cd /? in the Command Prompt window to display the name of the current directory or changes in the current directory. After entering the command you will get the following information in Command Prompt (CMD).

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]
  • This .. Specifies that you want to change to the parent directory.
  • Type CD drive: to display the current directory in the specified drive.
  • Type CD without parameters to display the current drive and directory.
  • Use the /D switch to change the current drive /in addition to changing the current directory for a drive.

Type the command in the Command Prompt window to display the name. How to change directory in CMD Windows 10

In addition to Command Prompt, Windows users can also use PowerShell to execute various commands as explained by Microsoft.

Continue reading below to modify/switch to the directories or to a different file path.

Method 1: Change Directory By Path

Use the command cd + full directory path to access a specific directory or folder. Regardless of which directory you are in, this would take you straight to the desired folder or directory. Follow the given steps to do so:

1. Open the directory or folder which you want to navigate in CMD.

2. Right-click on the address bar and then select Copy address, as shown.

Right click on the address bar and then select copy address to copy the path

3. Now, press the Windows key, type cmd, and hit Enter to launch Command Prompt.

press windows key, type cmd and hit enter

4. In CMD, type cd (the path you copied) and press Enter as depicted.

In CMD, type cd the path you copied and press Enter. How to change directory in CMD Windows 10

This will open the directory which path you copied in Command Prompt.

Method 2: Change Directory By Name

Another way for how to change the directory in CMD Windows 10 is to use the cd command to launch a directory level where you are currently working:

1. Open Command Prompt as shown in Method 1.

2. Type cd (directory you want to go to) and hit Enter.

Note: Add the directory name with the cd command to go to that respective directory. e.g. Desktop

change directory by directory name in command prompt, cmd

Also Read: Delete a Folder or File using Command Prompt (CMD)

Method 3: Go To Parent Directory

When you need to go one folder up, use the cd.. command. Here’s how to change the parent directory in CMD on Windows 10.

1. Open Command Prompt as earlier.

2. Type cd.. and press Enter key.

Note: Here, you will be redirected from the System folder to the Common Files folder.

Type the command and press Enter key. How to change directory in CMD Windows 10

Method 4: Go To Root Directory

There are many commands to change the directory in CMD Windows 10. One such command is to change to the root directory:

Note: You can access the root directory irrespective of which directory you belong to.

1. Open Command Prompt, type cd /, and hit Enter.

2. Here, the root directory for Program Files is drive C, which is where the cd/ command has taken you.

Use the command to access the root directory irrespective of which directory

Also Read: How to create empty files from the command prompt (cmd)

Method 5: Change Drive

This is one of the easiest methods on how to change the directory in CMD on Windows 10. If you want to change the drive in CMD then, you can do so by typing a simple command. Follow the steps listed below to do so.

1. Go to Command Prompt as instructed in Method 1.

2. Type the drive letter followed by : (colon) to access another drive and press Enter key.

Note: Here, we are changing from drive C: to drive D: and then, to drive E:

Type the drive letter as shown to access another drive. How to change directory in CMD Windows 10

Method 6: Change Drive & Directory Together

If you want to change the drive and directory together then, there is a particular command to do so.

1. Navigate to Command Prompt as mentioned in Method 1.

2. Type the cd / command to access the root directory.

3. Add the drive letter followed by : (colon) to launch the target drive.

For Example, type cd /D D:\Photoshop CC and press Enter key to go from drive C: to Photoshop CC directory in D drive.

Type the drive letter as shown to launch the target drive. How to change directory in CMD Windows 10

Also Read: [SOLVED] The file or Directory is corrupted and unreadable

Method 7: Open Directory from Address Bar

Here’s how to change the directory in CMD on Windows 10 directly from the address bar:

1. Click on the address bar of the directory you want to open.

Click on the address bar of the directory. How to change directory in CMD Windows 10

2. Write cmd and press Enter key, as shown.

Write cmd and press Enter key. How to change directory in CMD Windows 10

3. The chosen directory will open in Command Prompt.

chosen directory will open in CMD

Method 8: View Inside the Directory

You can also use commands to view inside the directory, as follows:

1. In Command Prompt, use command dir to view the subfolders and subdirectories in your current directory.

2. Here, we can see all directories within C:\Program Files folder.

Use the command “dir” to view the subfolders. How to change directory in CMD Windows 10

What happens when Command Extensions are enabled?

If Command Extensions are enabled, CHDIR changes as follows:

  • The current directory string is converted to use the same case as the on-disk names. So, CD C:\TEMP would actually set the current directory to C:\Temp if that is the case on disk.
  • CHDIR command does not treat spaces as delimiters, so it is possible to use CD into a subdirectory name that contains a space even without surrounding it with quotes.

For example: command: cd \winnt\profiles\username\programs\start menu

is same as the command: cd “\winnt\profiles\username\programs\start menu”

Recommended: How to Fix Git Merge Error

We hope this guide was helpful and you were able to change the directory in CMD Windows 10. Let us know which cd command Windows you think is more useful. Also, if you have any queries or suggestions regarding this article, then feel free to drop them in the comments section.

how to change drive in cmd

In the Windows command prompt (CMD), we use the cd command to change from one directory to another. However, it only changes the path inside the current drive by default.

If you want to change to a different drive in CMD, you need to use the /d switch.

cd /d D:

For example, I am working on the command prompt, inside the C:\Users\user1 folder. Now I want to move into a folder called data which is in the D: drive.

command prompt change drive

In the above screenshot, you can see that the command didn’t work. The solution is to use the /d switch.

how to change drive in command prompt

Alternatively, simply enter the drive letter followed by a colon, as follows:

D:

However, this method only changes to the root of the drive. If you want to go to a folder, you have to use the CD command.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Сменить заставку при загрузке windows 10
  • Можно ли удалять microsoft edge из windows 10
  • Лучшая замена проводника windows 10
  • Как изменить звук при запуске windows 11
  • Не удается активировать windows на этом устройстве код ошибки 0x8007007b