How to switch to another drive in the command line (cmd) ???
Drive name "b"
I do this, but it does not work (I tried to enter in all registers in different combinations)
cd /B b:\
How to switch to another drive in the command line (cmd) ???
Drive name "b"
I do this, but it does not work (I tried to enter in all registers in different combinations)
cd /B b:\
For the case if you just need to go to the root of another disk, just enter the name of the disk without the cd command.
b:
Then you can navigate through folders using the cd
.
You can immediately change the disk and go to the folder (see the answer Bald)
To switch to another drive in the Windows command line , simply specify its name with a colon. For example, to go to disk D , enter
d:
The cd
has one feature. If you specify in it the wrong drive that is currently active, then the transition to the desired directory will not occur. You will remain on the active drive without going to another. In order not only to change the current directory on another disk, but also to switch to it, you need to add the /d
switch:
cd /dd:\Folder
D:\>cd /?
Display the name or change the current directory.
CHDIR [/ D] [drive:] [path] CHDIR [..] CD [/ D] [drive:] [path] CD [..]
.. indicates a transition to the parent directory.
Command CD Disk: displays the name of the current directory of the specified disk. The CD command with no parameters displays the names of the current disk and directory.
The / D parameter is used to simultaneously change the current disk and directory.
Changing the CHDIR command when enabling advanced command processing:
The name of the current directory in the call string is converted to the same character case as for existing names on the disk. So, the CD C: \ TEMP command will actually make the C: \ Temp directory current if it exists on the disk.
The CHDIR command stops treating spaces as delimiters, which allows you to go to a subdirectory whose name contains spaces, without quoting the entire directory name. For example:
cd \winnt\profiles\username\programs\start menu
leads to the same result as:
cd "\winnt\profiles\username\programs\start menu"
When you disable extended command processing, only the second option is used.
b
, in your case the command may look like `cd / d B:` - BaldIf you need to launch the DOS window ("Command line") then click Windows + r and in the window type and execute the command
cmd /K (b: & cd b:\folder)
If the DOS window is already open, enter
b: & cd b:\folder
Where
b:
this is the drive you need
\folder
path to the desired folder
& [...]
command1 & command2 Use to separate multiple commands on a single command line. Cmd.exe runs the first command, and then the second command.
&& [...]
command1 && command2 Use to run a command following && only if the command preceding a character is successful. Cmd.exe runs the first command, and then runs the second command only if the first command has completed successfully.
|| [...]
command1 || command2 Use to run the command following || only if the command preceding || fails. Cmd.exe runs the first command, and then runs the second command only if the first command did not complete successfully (it receives an error code greater than zero).
( ) [...]
(command1 & command2) Use to group or host multiple commands.
; or ,
command1 parameter1; parameter2 Use to separate command parameters.
Source: https://ru.stackoverflow.com/questions/974253/
All Articles
/B
? - Grundy