Sometimes you just need to change directory or even drive in Command Prompt on all MS Windows Desktop and Server OS!
Everyone probably knows how easy it is ► ... to open the command prompt directly in each folder , but what if you want to change the directory or drive directly in cmd.exe?
1.) ... Jumping into a subdirectory of the command prompt
|(Image-1) Change directory or drive in command prompt!|
2.) Changing the drive in the command prompt
If you want to change the drive, for example, enter D: to change to the drive,
then you can list the subdirectories with "dir" to possibly change to a subdirectory!
(... see Image-2 Point 1 and 4)
|(Image-2) Change drive and then subdirectory!|
3.) Changing the drive and directory in the command promptFor example, you can use two commands on one line to jump to a subdirectory on another drive!
Two commands are separated by the & character, for example: f:&cd f:\dx9 or only f:&cd dx9
Or with the parameter "d" you are on drive X and want to change to the directory F:\dx9
Then it would be the command line X:\>cd /df:\dx9
( ... see Image-3 )
|(Image-3) Change directory and drive in the command prompt!|
Always use the /D option to change the current drive in addition to changing directories.
4.) What should I watch out for in directories and commands?Even if it's not always as practical as opening the directory from the address line in File Explorer or dragging and dropping it into cmd.exe. Nevertheless, it is good to know how to enter a command to change directories or drives directly in the command prompt.
It should be noted that, for example, you are executing the command in the wrong directory, because in File Explorer you can no longer undo actions such as deleting.
FAQ 130: Updated on: 9 June 2022 10:59