Загрузить PDF
Загрузить PDF
В этой статье рассказывается, как перейти в другую папку (каталог) в командной строке Windows. Чтобы работать с командной строкой, необходимо использовать учетную запись администратора.
-
1
Откройте меню «Пуск». Для этого щелкните по логотипу Windows в нижнем левом углу экрана или нажмите клавишу ⊞ Win на клавиатуре.
- В Windows 8 переместите указатель мыши в верхний правый угол экрана и щелкните по отобразившемуся значку в виде лупы.
-
2
В строке поиска введите командная строка. Значок утилиты командной строки отобразится над строкой поиска.
-
3
Щелкните правой кнопкой мыши по значку командной строки. Он имеет вид черного квадрата. Откроется контекстное меню.
-
4
Нажмте Запуск от имени администратора. Эта опции находится в верхней части раскрывшегося меню. Откроется командная строка с правами администратора.
- В открывшемся окне с предложением подтвердить ваши действия нажмите «Да».
- Нельзя запустить командную строку от имени администратора, если вы работаете на компьютере, у которого есть ограничения, который находится в публичном месте или подключен к локальной сети (например, в библиотеке или в школе), то есть в том случае, когда вы пользуетесь гостевой учетной записью.
Реклама
-
1
Введите cd . После «cd» обязательно добавьте пробел. Эта команда, которая представляет собой сокращение от «change directory» (изменить каталог), является основной командой для перехода в другой каталог.
- Не нажимайте клавишу ↵ Enter.
-
2
Определите путь к нужному каталогу. Путь к каталогу похож на перечень папок. Например, если нужным каталогом является папка «System32», которая находится в папке «WINDOWS» на системном диске, путь будет таким: «C:WINDOWSSystem32».
- Чтобы выяснить путь к папке, откройте окно «Мой компьютер», дважды щелкните по значку жесткого диска, перейдите в нужную папку, а затем скопируйте информацию из адресной строки Проводника (сверху).
-
3
Введите путь к каталогу. Сделайте это после команды «cd». Убедитесь, что между «cd» и путем к каталогу есть пробел.
- Например, команда может выглядеть так: cd WindowsSystem32 или cd D:.
- По умолчанию местоположением всех папок считается жесткий диск (например, «C:»), поэтому букву жесткого диска вводить не нужно.
-
4
Нажмите ↵ Enter. Так вы перейдете в нужный каталог.
Реклама
Советы
- Изменить каталог необходимо, чтобы отредактировать или удалить файл.
- Некоторыми общими командами для работы с каталогами являются следующие:
- D: или F: – изменить каталог на дисковод или подключенный флеш-накопитель.
- .. – переместиться из текущего каталога на одну папку вверх (например, из «C:WindowsSystem32» в «C:Windows»).
- /d – одновременно изменить диск и каталог. Например, если в командной строке вы находитесь в корневом каталоге диска «D:», введите «cd /d C:Windows», чтобы перейти в папку «Windows» на диске «C:».
- – перейти в корневой каталог (например, системного диска).
Реклама
Предупреждения
- Попытка запустить команду, связанную с определенным файлом или папкой, из другого каталога приведет к ошибке.
Реклама
Об этой статье
Эту страницу просматривали 663 706 раз.
Была ли эта статья полезной?
Download Article
Download Article
This wikiHow teaches you how to change the folder (also known as the «directory») in which your Windows computer’s Command Prompt program operates. To make changes in Command Prompt, you must be using an administrator account.
Things You Should Know
- Open start and type cmd. Right click Command Prompt and click Run as administrator.
- Type cd and enter your directory’s path. The path can be found by looking at the address at the top of the folder you are directing to.
- Press ↵ Enter.
-
1
Open Start. Either click the Windows logo in the bottom-left corner of the screen, or press the ⊞ Win 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
Type in cmd. This will bring up the Command Prompt icon at the top of the Start window.
Advertisement
-
3
Right-click Command Prompt. It resembles a black box. This invokes a drop-down menu.
-
4
Click Run as administrator. It’s near the top of the drop-down menu. Doing so will open 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’re on a restricted, public, or networked computer (e.g., a library or school computer), or an otherwise non-administrator account.
Advertisement
-
1
Type in cd . Make sure you include the space after «cd». This command, which stands for «change directory», is the root of any directory change.
- Don’t press the ↵ Enter key.
-
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:WINDOWSSystem32».
- You can find a folder’s path by opening My Computer, double-clicking the hard drive icon, navigating to your destination, and then looking at the address at the top of the folder.
-
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 WindowsSystem32 or cd D:.
- Since your computer’s default directory location will be the hard drive (e.g., «C:»), you don’t need to type in the hard drive’s name.
-
4
Press ↵ Enter. Doing so will change the Command Prompt directory to your selected one.
Advertisement
Add New Question
-
Question
How do I go to C: from C:usersusername?
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.
-
Some common Command Prompt directory commands include the following:
- D: or F: — Change the directory to the disk drive or an attached flash drive.
- .. — Move the current directory up by one folder (e.g., «C:WindowsSystem32» to «C:Windows»).
- /d — Changes the drive and the directory at the same time. For example, if Command Prompt is in the disk drive («D:»), typing «cd /d C:Windows» would move you to the Windows directory on the hard drive («C:»).
- — Takes you to the root directory (e.g., the hard drive).
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
Article SummaryX
1. Open Command Prompt.
2. Type in cd followed by a space.
3. Type in your preferred directory command or path.
4. Press ↵ Enter.
Did this summary help you?
Thanks to all authors for creating a page that has been read 2,432,821 times.
Is this article up to date?
Download Article
Download Article
This wikiHow teaches you how to change the folder (also known as the «directory») in which your Windows computer’s Command Prompt program operates. To make changes in Command Prompt, you must be using an administrator account.
Things You Should Know
- Open start and type cmd. Right click Command Prompt and click Run as administrator.
- Type cd and enter your directory’s path. The path can be found by looking at the address at the top of the folder you are directing to.
- Press ↵ Enter.
-
1
Open Start. Either click the Windows logo in the bottom-left corner of the screen, or press the ⊞ Win 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
Type in cmd. This will bring up the Command Prompt icon at the top of the Start window.
Advertisement
-
3
Right-click Command Prompt. It resembles a black box. This invokes a drop-down menu.
-
4
Click Run as administrator. It’s near the top of the drop-down menu. Doing so will open 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’re on a restricted, public, or networked computer (e.g., a library or school computer), or an otherwise non-administrator account.
Advertisement
-
1
Type in cd . Make sure you include the space after «cd». This command, which stands for «change directory», is the root of any directory change.
- Don’t press the ↵ Enter key.
-
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:WINDOWSSystem32».
- You can find a folder’s path by opening My Computer, double-clicking the hard drive icon, navigating to your destination, and then looking at the address at the top of the folder.
-
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 WindowsSystem32 or cd D:.
- Since your computer’s default directory location will be the hard drive (e.g., «C:»), you don’t need to type in the hard drive’s name.
-
4
Press ↵ Enter. Doing so will change the Command Prompt directory to your selected one.
Advertisement
Add New Question
-
Question
How do I go to C: from C:usersusername?
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.
-
Some common Command Prompt directory commands include the following:
- D: or F: — Change the directory to the disk drive or an attached flash drive.
- .. — Move the current directory up by one folder (e.g., «C:WindowsSystem32» to «C:Windows»).
- /d — Changes the drive and the directory at the same time. For example, if Command Prompt is in the disk drive («D:»), typing «cd /d C:Windows» would move you to the Windows directory on the hard drive («C:»).
- — Takes you to the root directory (e.g., the hard drive).
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
Article SummaryX
1. Open Command Prompt.
2. Type in cd followed by a space.
3. Type in your preferred directory command or path.
4. Press ↵ Enter.
Did this summary help you?
Thanks to all authors for creating a page that has been read 2,432,821 times.
Is this article up to date?
Если нужно запустить DOS окно («Командная строка») тогда
нажмите Windows + r
и в окне введите и выполните команду
cmd /K (b: & cd b:folder)
Если DOS окно уже открыто, то введите
b: & cd b:folder
где
b:
это диск который вам нужен
folder
путь к нужной папке
& [...]
command1 & command2
Используйте для разделения нескольких команд в одной командной строке. Cmd.exe запускает первую команду, а затем вторую команду.
&& [...]
command1 && command2
Используйте для запуска команды, следующей за && только если команда, предшествующая символу, успешна. Cmd.exe запускает первую команду, а затем запускает вторую команду только в том случае, если первая команда успешно завершена.
|| [...]
command1 || command2
Используйте для запуска команды, следующей за || только если команда, предшествующая || выходит из строя. Cmd.exe запускает первую команду, а затем запускает вторую команду только в том случае, если первая команда не завершилась успешно (получает код ошибки больше нуля).
( ) [...]
(command1 & command2)
Использовать для группировки или размещения нескольких команд.
; or ,
command1 parameter1;parameter2
Используйте для разделения параметров команды.
При работе в операционной системе Windows зачастую возникает необходимость сменить диск в командной строке. Одна команда cd
с указанием буквенного обозначения диска не приводит к желаемому результату.
Также безуспешно закончится переход не только в корень диска, отличного от текущего, но и произвольную директорию на другом диске.
Справка. CMD — командная строка, одноименная программа cmd.exe, которая находится в папке system32. Встроена во все операционные системы семейства Windows NT. Используется продвинутыми пользователями для выполнения операций, которые затруднительно или вообще невозможно выполнить с помощью графического интерфейса. Примером тому может служить например создание символьной ссылки или тестирование соединения с IP-адресом с помощью команды ping
.
Оказывается, чтобы в cmd перейти на другой диск, нужно просто ввести название диска без команды cd
.
Если же требуется не только поменять диск, но и сразу же перейти в конкретную папку, тогда команду cd
следует использовать с ключом /d
. По окончании выполнения команды, текущим каталогом станет указанная папка. Вывести текущую директорию можно той же командой cd
без указания параметров.
Как видите, сменить каталог в cmd оказывается очень просто. Рекомендуем ознакомиться с другими встроенными в Windows программами, например, CHKDSK.