Select a directory on the command line. System commands. Running the command line

Instructions

Use the cd command to change to another drive operating system. CD is short for chdir (from CHange DIRectory - “Change Directory”). DOS syntax allows you to use both cd and chdir. Full description This command can be obtained directly in the terminal by executing it with the /? modifier:
chdir /?

Add the /d modifier to the chdir (or cd) command to switch from the current media to another physical or virtual disk. For example, if you need to go to drive F, then type and execute the following command:
chdir /d F:

Use backslash(\) as a parameter to the chdir command to move from any directory of the current drive to its root:
chdir\

In addition to the /d modifier, specify the full path from the root of the desired disk if you need to switch to a specific directory located on it. For example, to go to a folder called SubFilder, located on drive F inside the MainFolder directory, you need to enter and execute command line:
chdir /d F:\MainFolder\SubFilder

Entering long folder paths over and over again is quite inconvenient. The command line terminal interface does not allow you to select and copy a path once typed, but it does have a paste command. Can be used as auxiliary tool, For example, Windows Explorer. Revealed in it the desired folder, select and copy to address bar full path (CTRL + C). Then switch to the command line terminal, right-click it and select Paste from the context menu.

Enclose the full path to the desired folder in quotes if it contains spaces in the directory names. For example, like this:
chdir /d "F:\Program Files\msn gaming zone"
Quotes are not always needed - only if the so-called “command processor extensions” are activated in the operating system.

Disable shell extensions if you want to enter full paths without quotes when switching to another drive:
cmd e:off

Sources:

  • how to switch to

On any operating system personal computer Today there are no less than two virtual or physical disks. The operation of switching from one of them to another is quite simple, but it is carried out differently in different applications. Most often, you have to move from disk to disk in file manager programs, less often - in the command line terminal interface.

Instructions

IN standard manager operating room files Windows systems It's very easy to switch from one drive to another. The window of this application is divided into two vertical frames, one of which - on the left - contains a directory tree. It starts with the root folder, which is represented in this frame by the icon of the corresponding drive indicating the letter and name assigned to it. To go to any disk, simply left-click on its icon in this list. You can open another disk in a separate window - to do this, right-click its icon and in the context menu select the line that says “Open in new window”.

In still quite common file managers with an interface from the heyday of the command line - for example, FAR, Norton Commander - working space also divided into two vertical frames. Each of them can have a separate drive open, and the easiest way to switch from one to another is to use keyboard shortcuts. To switch to the drive opened in the right frame, use the combination Alt + F2, and in reverse direction go with Alt combinations+ F1.

When you log into the command line emulator, this application always opens in the folder of the user who launched it on system disk. Going to any other drive is also very easy here - enter its letter, put a colon and press Enter on the keyboard. To move to the desired folder of this media, use the standard DOS directory change command - cd or chdir.

In recent Windows versions You can simplify working with the command line, since instead of changing the drive using the DOS command, you can use the option to launch the emulator immediately in the desired folder of the desired drive. To do this, go to this folder in Explorer and right-click on it while holding down Shift key. In the context menu with this method of calling it, an additional item appears - “Open command window”. Select it and the command line will launch with the go to commands already executed required disk and changing directory.

Video on the topic

Windows OS continues to provide the ability to use a DOS command emulator in standard distributions. However, command line descriptions are no longer as common, and questions occasionally arise about which command should be used with which syntax for relatively simple operations. One of these questions is how to switch to another one in the terminal disk.

Instructions

Use the chdir command (for Change Directory) to switch between physical or virtual disk ami of yours. The syntax allows you to use this command in its abbreviated form - cd. To get complete help about this command, type this: chdir /? Using this modifier (/?) you can get help not only about this, but also about any other command.

Add the /d modifier to the cd (or chdir) command to change the current disk. For example, to switch to disk E you should type the following command: cd /d E: A command to go to root folder current disk and does not require specifying anything other than a backslash: cd

If you need to switch to a specific directory of another virtual or physical disk and then you should specify the full path to it from the root directory of the new disk A. For example, to navigate to the InnerFolder folder located in the OuterFolder folder disk and D, the corresponding command should look like this: cd /d D:OuterFolderInnerFolder It is not necessary to type long paths to the desired directories in the terminal each time - it is possible to use copy operations using the mouse. You can, for example, in standard Windows Explorer, copy the full path to the folder in the address bar, then switch to the line terminal, right-click and select paste from the context menu.

If there are spaces in the name of the directory you want to switch to, then specifying the full path to the desired folder will not always be enough. In some cases it needs to be enclosed in . For example:cd "D:Program Filesmsn gaming zone"

In modern operating systems with a graphical interface, to navigate to the desired folder The default file manager program is used. It is very rare to carry out this operation in the command line interface, but in these cases no special knowledge is required; simple rules for formatting just one DOS command are enough.

You will need

  • Windows OS.

Instructions

Launch a command line terminal - open the main menu of the operating system, type “com” on your keyboard and select the “Command Prompt” link in the list of search results. In more earlier versions Windows OS - for example, Windows XP - press the Win + R key combination, type cmd and press Enter.

If the desired folder is not located on the system drive, enter the letter of the desired volume, add a colon and press Enter. After this, you can type the command to go to a specific folder disk.

Use the chdir command or its shorthand cd to move to the desired folder. The only required parameter that must be specified along with this command is the path to folder from the root directory of the disk. Enter it, separated from the command itself by a space, and then press Enter key.

On Windows OS latest versions- Vista and Seven - it is possible to launch the command line interface with the command to go to the desired folder already executed. To do this, use the file manager of this operating system - “Explorer”. Use it to navigate to the directory you are interested in, press the Shift key and right-click the folder icon. Select the “Open command window” item in the context menu, and the OS will do the rest - and going to this folder.

Windows Explorer can also be used with the cd command in an already running command line emulator. First, type the command in the usual way and add a space. To avoid typing a long folder address from the keyboard, copy it into the address line file manager and switch to the command line terminal. It contains standard hot Windows keys, including those assigned to copy and paste operations, do not work, so expand context menu and select the “Insert” line. After this, you just have to press Enter to complete the operation.

The command line is software tool input of commands by the user and receiving the results of their execution on the screen. In modern operating systems Windows family, the command line provides standard application cmd.exe, also called command processor, command interpreter and console. The Command Line application provides the user with a text interface for entering commands and obtaining the results of their execution. In fact, the command line is a software emulator of the classic console of the first computer systems, which is a terminal with a keyboard used by the operator as a means of communicating with the computer. As in the days of the first computers, the command line supports the standard input device, the keyboard, and the standard output device, the display. The user enters commands from the keyboard and receives the results of their execution on the display screen.

Launch the command line.

To launch the command line, you can use one of the following methods:

Start - Run (or Win+R keys) enter cmd and press the Enter key;

Start - All Programs - Accessories - Command Prompt";

Start - Search - Command Line . Also, to launch the command line, you can use a pre-prepared shortcut that refers to executable file %SystemRoot%\system32\cmd.exe(usually C:\Windows\system32\cmd.exe). Executing some commands requires elevated privileges, therefore, the command line application must be launched using the right-click “Run as administrator” context menu item.

Command line setup.

The standard command line window is a window with symbols white on a black background. You can change font settings, character color and background, clipboard usage, and other command line properties to suit your preferences. Settings can be made by changing the properties of the shortcut that launches the command line application, or by editing registry settings related to the command processor.

Working on the command line involves entering data from the keyboard, and sometimes quite a lot of it. This volume can be significantly reduced using some techniques:

Using the clipboard.

Text selected in the application window can be copied to the clipboard, as well as pasted from the clipboard into the input field. With standard command line settings, to select text, use the “Mark” item in the right-click context menu. If desired, in the properties of the shortcut used to launch, you can enable mouse selection mode:

In mouse selection mode, the context menu is not used, and text is selected using the left mouse button. Copying and pasting is performed by clicking the right mouse button. When the “Allow keyboard shortcuts with CONTROL” mode is enabled, you can use standard combinations keys:

CTRL+C (CTRL+Insert) – copy the selected text.

CTRL+V (Shift+Insert) – paste selected text.

Using command history and hotkeys.

To recall previously entered commands, use the arrow keys Up Arrow - one command back and Down Arrow - one command forward. In addition, you can use function keys:

F1- character-by-character call of the last entered command. Each press of F1 results in sequential substitution of one character from the previous command into the input field.

F2- copying to character. After pressing F2, the screen displays a request for the character to which the previous command will be copied. For example, if the previous command was ping yandex.ru, and a dot is specified as a symbol, then the command input line will contain ping yandex, if a space is given, then - ping.

F3- call the previous command.

F4- delete up to the symbol. Deletes text from the current cursor position to the specified character.

F5 And F8- calling a buffer of previously entered commands. Output by pressing the F5 key stops when the first entered command of the current session is displayed.

F7- display of previously entered commands in a separate window in the form of a list. To execute the desired command, select it using the arrow keys and press ENTER

F9- execute the command whose number is requested. The command number in the history list can be obtained by using F7.

On Windows 10 / Windows Server 2016 introduced features that were missing in previous command line implementations:

Changing the transparency of the console window when pressing combinations CTRL+Shift+- or CTRL+Shift++ .

Turn on/off full screen mode when you press CTRL+Enter.

Expanded text selection and editing capabilities:

Shift+Home– select text from the current cursor position to the beginning of the line.

Shift+End– select text from the current cursor position to the end of the line.

Quickly move through the screen buffer and search by context:

CTRL+Home– go to the beginning of the screen buffer

CTRL+End– go to the end of the screen buffer.

CTRL+Up Arrow- move 1 line up.

CTRL+Down Arrow- move 1 line down.

CTRL+F- open the text search dialog in the screen buffer.

The command prompt window in Windows 10 can be closed using the standard keyboard shortcut - ALT+F4.

To disable new CMD capabilities, you need to check the box “Use” in the application properties previous version console (requires restart)”

File path completion

In the Windows command line, you can perform file and directory name substitution when you press a key Tab. For example, to go to a directory with long name Program Files type the initial part of the directory name

CD Pro and press Tab. The command should appear in the input line:

CD "Program Files"

As you can see, the missing part of the directory name is substituted, and in cases where it contains a space character, it is also added double quotes.

If there are multiple matching initial parts of file or directory names, each time you press the key Tab the following will be substituted alphabetical order Name. To return to the previous one, use the combination Shift+Tab

Redirect console standard input/output data.

As already mentioned, the standard command line input device is the keyboard, and the display is used as the output device. However, there is a possibility redirects I/O to other devices using redirection operators:

  • > - output redirection. The output is written to a file or sent to the specified device.

    ping –n 5 localhost > nul- ping the loopback interface 5 times with output redirected to a dummy device nul. The output of the command execution results is suppressed. A similar technique is used to organize a delay in command files, since the ping of the loopback interface is performed almost instantly, and the interval between pings is one second, the execution time of this command is determined by the value of the parameter -n

    ping –n 100 yandex.ru > C:\ping-ya.txt- ping the yandex.ru node 100 times, writing the results of the command to the file C:\ping-ya.txt. If the file does not exist, it will be created, and if it exists, its contents will be overwritten.

  • >> - the same as in the previous case, but the data is written to the end of the file.

    ping –n 100 yandex.ru >> C:\ping-ya.txt- the same as in the previous example, but if the file does not exist, then it will be created, and if it exists, then the results will be written to the end of the file.

  • - input redirection. The data is not read from the keyboard, but from a file or other device.

    cmd - launch the CMD command processor and enter data from the 1.txt file. If you put the line in the file ping –n 100 yandex.ru, then the command discussed above will be executed.

  • | - redirect the output of the first command to the input of the next one.

    Often, the output of one command needs to be passed as input to another, i.e. combine commands into a sequential chain:

    ping -n 100 microsoft.com | find "Interval exceeded"- result of command execution ping -n 100 microsoft.com passed as input to the string search command ( find) containing the text "Interval exceeded".

    ping -n 100 microsoft.com | find "Interval exceeded" > C:\ping-ya.txt- the same as in the previous example, but with redirection of the output results of the command execution to text file.

  • Using console I/O handles.

    To each open file or the device corresponds to its own descriptor (handle) which is a non-negative number whose value is used by the process that spawned the I/O thread. By default, for all processes, including command interpreter cmd.exe :

    0 (STDIN) – standard input descriptor (keyboard input).

    1 (STDOUT) – standard output descriptor (output to screen).

    2 (STDERR) – descriptor for displaying diagnostic messages (error messages on the screen).

    Handles can be used in cases where you need to redirect (change) data sources and sinks in standard input/output streams. For example:

    ping.exe –n 100 yandex.ru 2> C:\pinglog.txt- standard program message flow ping.exe will be displayed on the screen, and errors ( standard output with descriptor = 2) will be written to a file C:\pinglog.txt. In the real case for the program ping.exe The above construction is not significant since it displays both diagnostics and results on the screen.

    To specify redirection to existing handles, use an ampersand (&) followed by the number of the desired handle (for example, &1):

    ping –n 100 yandex.ru >log.txt 2>&1- standard error messages (handle=2) are redirected to standard output (handle = 1) and the whole thing is redirected to a file log.txt current directory.

    ping –n 100 yandex.ru >log.txt 1>&2- standard output (handle = 1) is redirected to error message output (handle = 2) and all this is written to a text file.

    If the handle is not defined, then the input redirection operator defaults to will be zero (0), and the output redirection operator > will be one.

    Chaining multiple commands

    In the Windows command line, it is possible to execute several commands sequentially, depending on the results of their execution. What are command concatenation symbols used for - & (ampersand) and | (vertical bar)

    & - A single ampersand is used to separate multiple commands on the same command line. For example:

    echo ping ya.ru- display a line on the screen ping ya.ru

    echo &ping ya.ru- sequential command execution echo without parameters and command ping ya.ru

    && - conditional execution of the second command. It will be executed if the exit code (the value of which is passed to the standard variable ERRORLEVEL) of the first command equal to zero, i.e. the command completed successfully.

    team1 && team2- performed team1, A team2 executed only if the first one was executed successfully. For example:

    ping ya.ru -err & ping –n 2 ya.ru- when using a single ampersand, the first command ping ya.ru –err -err, and the second, ping –n 2 ya.ru will ping the node twice ya.ru

    ping ya.ru -err && ping –n 2 ya.ru- when using a double ampersand, the first command ping ya.ru –err will display a message about an invalid parameter -err and, accordingly, will generate a termination code not equal to zero (error), which will lead to the fact that the second command ( ping ya.ru -n 2) will not be executed.

    Double vertical bar || - conditional execution of the second command. If the first command returns with a non-zero return code (failure), then the command following the double vertical bar is executed.

    team1 || team2- If team1 executed unsuccessfully, then it is started for execution team2

    ping –n 1 ya.ru && ping –n2 ya.ru || ping –n 3 ya.ru- the 1st command will be executed first ping ya.ru –n 1- single node ping ya.ru, then the command will be executed ping ya.ru -n 2- double node ping ya.ru. Third team ping ya.ru -n 3, ping the node three times ya.ru will not be executed.

    ping –n 1 –err ya.ru && ping ya.ru -n 2 || ping ya.ru -n 3- first team ping ya.ru –n 1 –err will fail due to an invalid parameter -err, second team ping –n 2 ya.ru- double node ping ya.ru will fail due to the double ampersand condition, and will result in the third command being executed ping –n 3 ya.ru, ping the node three times ya.ru.

    In some cases, it may be necessary to prohibit the processing of service characters and treat them as plain text. For example, if you enter on the command line

    ECHO

    Then instead of text ping -n 1 ya.ru & ping -n 2 ya.ru the part up to the ampersand character will be displayed ping -n 1 ya.ru and then the command after the ampersand is executed - ping -n 2 ya.ru. The problem is solved by using a special escape character ^ , which allows you to use service characters as text:

    ECHO ping -n 1 ya.ru ^& ping -n 2 ya.ru- text display ping -n 1 ya.ru & ping -n 2 ya.ru

    Conditional command processing logic implemented using constructs && And || affects only the nearest command, that is, when entering the command

    Team COPY /? will run in any case, regardless of the result of the command TYPE C:\plan.txt. However, several commands can be grouped using parentheses. For example, there are 2 command lines:

    TYPE C:\plan.txt && DIR & COPY /?

    TYPE C:\plan.txt && (DIR & COPY /?)

    In the first of them, the conditional processing symbol && acts only on the DIR command, in the second - on two commands simultaneously: DIR and COPY. As a visual experiment, try running the second command under both file present and file absent conditions C:\plan.txt. To create an empty file, you can use copying from a dummy device nul:

    copy nul C:\plan.txt

    To delete a file use the command erase c:\plan.txt or del C:\plan.txt

    Batch files

    Batch files (scripts) are ordinary text files with a pre-prepared set of commands for execution by the command processor cmd.exe. As a standard, such files have the extension .bat or .cmd. Lines of command files can contain specific commands of the command processor itself, for example - FOR, ECHO, REM, etc. or the names of executable modules – reg.exe, sc.exe, auditpol.exe., which can be used without the extension – reg, sc, auditpol. Example of a simple batch file:

    REM Creates a text file listing the Windows directory
    dir C:\Windows > %TEMP%\winlist.txt
    REM delay for 5 seconds
    ping -n 5 localhost > nul
    REM File opens in WordPad editor
    write %TEMP%\winlist.txt
    REM After Wordpad finishes running, the text file is deleted.
    erase C:\winlist.txt

    Lines starting with REM are comments. As an example, commands are used to work with the file system and the application is launched graphical environment– text Wordpad editor(write.exe) and passing it a command line parameter (file name). The command file language is quite primitive and does not fully meet the requirements of today, however, it is the most simple means automation routine actions and is used by most system administrators and literate users. Work with batch files– this is a separate topic, described in more detail on the page

  • Using commands CMD Windows you can launch system utilities much faster than doing it the usual way. And, although not everyone understands the meaning of this text interface Though considered outdated, the tool is actually quite useful.

    And not only for professionals, but also for ordinary users. Although to run most commands, you should run the command line (cmd) as an administrator.

    The need to use the command line

    The cmd line, which is standard tool Windows platforms, is no different in different versions operating systems - in the seventh, and in the eighth, and in the tenth, and even in XP. And all teams work the same way in each of them.

    The advantage of using a string is that it speeds up the work - sometimes entering the desired command is much faster than searching in system folders corresponding file. Moreover, to speed up work with CMD, a link to it can be displayed on the desktop - or even on the Quick Launch panel.

    The disadvantages of the interface are:

    • manual command entry from the keyboard;
    • the need to run CMD as an administrator (most commands will not run otherwise);
    • enough big list commands that are difficult to remember.

    Externally, the command line is very similar to the interface DOS systems. And, although it allows you to decide much more tasks, some commands are the same as the legacy platform. For example, “format”, “cd” and “dir”, necessary for working with folders and drives.

    Working with the interface

    Before you start working with the command line, you must first launch it. There are several ways to do this:

    1. Open the “Run” menu (pressing Win + R at the same time) and enter the cmd.exe command;
    2. Go to Windows folder on the system drive, open the System32 directory and run the file called cmd.exe. You can simplify the task by creating a shortcut that launches the same application and install it on the desktop;
    3. Open the Start menu, go to the All Programs section, then to the Accessories subsection and find the Command Prompt.

    You should know: After the first launch through the Start menu, CMD appears at the top of it - in the list of most frequently launched applications and utilities. And you can open a line while working in any application (even in a game), just by pressing the Win button on the keyboard.

    Rice. 1. Command line of the Windows operating system.

    The standard view of the command line is a black window with white text. If this option does not suit the user, he can change the colors depending on his preferences.

    To do this, right-click on the top of the window and go to CMD properties. In the window that opens, you can select the location of the line, the colors of the text or window, and even the font sizes. Here you can expand the interface to almost the entire screen, increasing the level of convenience of working with it.

    Rice. 2. Change command line settings

    Commands to help you work with CMD

    Hotkeys help make using the command line even easier - although they are not the same as usual Windows combinations. Instead of pressing standard sets Ctrl + C and Ctrl + V, copying and pasting text is done as follows:

    1. Click on the selected line in open window CMD right mouse button;
    2. Select “Mark”;
    3. Select text using the left button;
    4. Right click again. After this, all information ends up in the operating system's clipboard.

    In order to paste the copied information, press the same right button and select “Paste”. You can simplify copying data by checking the “Mouse selection” box in the command line properties.

    After this, the text can be immediately selected with the left button. If you uncheck the box quick insert, data is inserted on top of already written commands.

    List of hotkeys

    When working with the command line, use the following “hot keys”:

    • The up and down arrows allow you to move the cursor around the window, including commands that have already been entered;
    • Home and End move the cursor to the beginning and end of the line, respectively;
    • left and right arrows while pressed at the same time Ctrl key allow you to move the cursor in a given direction by an entire word;
    • Insert, just like in any text editor, switches the modes of inserting text with a shift to the right and overwriting over written data;
    • Esc deletes the selected information;
    • F1 allows you to enter the last recorded command one character at a time;
    • F5 prints the previous command;
    • F7 lists several latest entries. By default, their number is 50.

    Basic Commands

    The list of basic commands that most users need is relatively small and consists of commands that perform the following actions:

    • work with catalogs;
    • displays work statistics various applications, network and operating system as a whole;
    • restore driver functionality;
    • turn off the computer.

    Using the command line, you can even format the drive (including the system drive, which cannot be formatted from a Windows system by any other means) and even stop the process. Also, using CMD, the user gets access to the registry editor and the system configuration window much faster.

    Working with catalogs

    The main command for working with directories is dir. With its help you can check the contents of an open directory. And, if you need to open another folder, you should additionally specify the path to it. For example, select “dir C:\” or “dir D:\”.

    Rice. 3. Checking the contents of logical drive C.

    The second command for working with directories is cd. With its help you can go to any selected folder. For example, by writing “cd C:\Windows” on the command line, go to the system directory. To open a folder on a disk that is already selected, issue a command like “cd /D D:\”.

    Rice. 4. Transition from local disk C to drive D.

    The mkdir command creates a new folder. And the parameter that is set after it determines the name of the directory. So, after entering “mkdir D:\New_Folder”, the corresponding directory appears on drive D. If the user specifies several directories in the list at once (for example, “E:\New\Games\Fallout_3”), an entire tree of folders can be created.

    Rice. 5. Create a new folder from the command line.

    Running the rmdir command allows you to delete a directory by specifying its full path. For example, by writing "rmdir D:\New_Folder", you can erase the newly created folder. Although, if there are other files inside the directory, a message appears on the screen indicating that it is not empty. Delete non-empty folder can be done by entering the command rmdir /S on the line. Before deleting, select “Y” (Yes), confirming your action.

    Rice. 6. Deleting a folder using the rmdir command.

    Turning off the computer

    Using the shutdown command, you can turn off the computer - either immediately or by setting a timer:

    • shutdown /s simply stops the operating system, closing all unfinished processes;
    • When you select the shutdown /s /t 3600 command, the timer will be set to exactly one hour. If you need to set any other time, the corresponding number of seconds is written instead of 3600;

    Rice. 7. Enable automatic shutdown of the system.

    • to cancel already set timer enter the shutdown /a command.

    Rice. 8. Cancel shutdown.

    The commands work the same on any operating system. The only difference is in the inscriptions that appear. So, for example, for Windows 7, messages are located in the lower right corner of the desktop.

    View statistics

    Viewing computer statistics begins with the systeminfo command. She gives out maximum amount Windows system information. Although it is more effective to use not system utility, but special applications.

    For example, AIDA64 – universal program for collecting information, the only drawback of which is the shareware license. A month after use, you will have to pay for the utility - from 1,400 to 2,200 rubles. per computer, depending on the number of licenses purchased.

    Rice. 9. Obtaining information about the computer and operating system.

    The driverquery utility allows you to view a list of drivers and their properties. In the list that appears on the screen you can see the type control program, reference date and module name.

    Rice. 10. Display a list of drivers.

    A utility called pathping, when run, shows information about the data lost during transmission between the starting and ending points. This command calculates loss ratios for different routers. And based on the results of the utility’s work, they identify access problems for individual routers.

    Rice. 11. A utility that checks network operation.

    The Netstat application shows information about active connections and statistics for various network protocols. When you run the command without specifying specific parameters, only TCP connections are displayed.

    Rice. 12. Check active connections TCP.

    The tasklist command displays a list of all processes launched by the system. With its help, you can familiarize yourself with the data received from remote computer. Although, if additional parameters are not specified, information is displayed only about the current device.

    The ipconfig utility displays information about the IP address and other parameters network adapter. Along with the command, additional parameters are used - for example, /all, which allows you to obtain information about each of the adapters.

    Rice. 13. Obtaining information about network connections.

    Changing system settings

    The msconfig utility allows you to call up a menu that allows you to change the operating system configuration:

    • a list of programs that automatically load with the system;
    • launch options;
    • Windows boot options.

    Most often, the command is used to remove or add an application to the startup tab. And sometimes they make changes to the loading order of operating systems - if two of them are installed on the computer (for example, Windows 10 and Windows XP, each of which may be more convenient for a particular user).

    Rice. 14. Calling the menu for changing the system configuration.

    Running the regedit utility opens the editor system registry- one of the most useful applications, with which you get rid of leftovers remote programs, make changes to services and fix problems. It is worth noting that changing any values ​​(not to mention deleting) must be done very carefully. Errors in the registry can lead to system crashes and even reinstallation. Read also our material: TOP 3 cleaning programs Windows registry 7.

    Rice. 16. Start scanning files on the system disk.

    The format command, which has not changed for decades, allows you to format any disk, including USB flash drives. Selecting “format C:” formats the system partition. And with the help additional parameters can be determined file system(/fs), set the volume label (/y), and even assign cluster sizes (/a). Without specifying certain conditions, the cluster is installed automatically.

    Rice. 17. Formatting the H drive via the command line.

    Stopping processes

    Using a command, you can stop a specific process. An identifier can be used for this (for example, 2616, if we are talking about graphic editor Paint) and the /pid parameter. In addition, when stopping, the name of the process itself and another /im parameter can be used. The same editor is closed with the command taskkill /im MSPaint.exe.

    Rice. 19. A utility that restores damaged system files.

    Clearing the screen

    After executing several commands, the window is filled with text, which may interfere with further work. You can get rid of unnecessary data using the CLS (Clear Screen) command. After launching it, the screen is completely cleared, leaving room for further actions user.

    conclusions

    With constant use of basic commands, they are easily remembered by the user. And in order to learn about new utilities or remember the names of old ones, you need to enter /help on the command line. A list of possible commands will appear on the screen that are unlikely to be useful for regular user, but can simplify the work of local network administrators.

    Using command Windows strings you can perform most of the functions that are used through GUI. Not only changing system settings, but also simply moving through folders is possible using this tool. If for some reason Explorer is not available to you, then you can always go to the folder in the command line. In this instruction we will understand how to work with directories via cmd.

    Step One: Launch the Command Prompt

    It all starts with the launch this application. This can be done in a variety of ways that are relevant for all current versions of the Windows operating system. These include Windows XP, 7, 8, 10.

    So, you can launch the command line using the following methods:

    1. Launch the Run application and use cmd command.
    2. Find the utility in search bar.
    3. Launch the program through the Start menu.

    There is also an option launch cmd already from the conductor. This allows you to navigate to a folder on the command line without typing a lot of commands. For example, you need to open cmd with the specified path to the System32 folder. To do this, first open the mentioned directory in Explorer, then right-click on free space and in the menu click on the “Open command window” item. The screen will appear the right application with a pre-registered link to the System32 folder.

    Step two: remember the necessary commands

    To go to a folder from the Windows command line, you just need to remember a series of simple combinations. They are presented below:

    • cd- this command used for any interaction with folders;
    • dir - displays all content in the selected directory;
    • cls - clear cmd screen from previous information and teams;
    • help - displays general help on all command line features;
    • help CD - help for a specific command;
    • cd .. - move to the root folder;
    • dir *.exe - displays a list of all files in a given directory that have the extension .exe.

    Using the presented combinations, you can easily go to the folder from the command line and find necessary files. Now let's look at this procedure using a simple example.

    Step three: use commands in practice

    Let's say the user needs to open the drivers directory, which is located in the system partition of the hard drive in the Windows/system32 folder. To do this, do the following:

    1. Open a command prompt and type cd C://Windows/System32/drivers, then press Enter to go.
    2. The requested directory will appear in the application window. You can open it either by entering the full path (shown above) or by navigating through each folder separately. For example, enter cd C://Windows/, then in the directory that opens, enter cd system32/ and so on.
    3. To avoid entering directory names manually, you can do the following. Type the cd command and type the first letters of the name. After that, use the Tab key to scroll through the entire contents of the folder. You can go through the command line to the directory by simply pressing Enter.

    For change hard section drive, you will need the command cd .. *drive letter*://*path to folder*. For example, cd .. E://Programs. After this, you proceed according to the rules described in the instructions above.

    Syntax

    Now you know how to navigate to a folder in the command line. The main rule is to enter all commands correctly. Be sure to include a space after cd. The same goes for combined commands, such as cd ..

    After the hard drive index, be sure to put a colon and two oblique lines - //. By the way, you can use // or \\ without any difference for the command. Using the up and down arrows, the user can move between previously typed text. If you use the same command several times, then it makes sense to use such a function.

    Going to the folder from the Windows command line turned out to be quite simple. If you have problems with the performance of the conductor, then this situation will not take you by surprise.

    This helps to safely perform various actions with documents, check the status of data transmission/reception and has many other functions. First of all, you should study actions with files and directories. How to open folders via the command line, creating them in general, working with them, including moving, renaming, how to delete a folder via the command line that is no longer needed - you can resolve these questions by reading the article. The problem looks worse than it actually is. The main thing here is to know the commands and enter the document address correctly. Below we will look at the basic operations, you can see for yourself that there is nothing overly complicated here.

    There are a few tricks to help you get started with the command line. You can open it as follows:

    When you first start, by default you are in your personal directory. Usually this is "C:\Users\<имя пользователя>\».

    Open an existing folder

    To open a folder, you must specify the path to it on the command line. First, enter the command “cd”, and then after a space the address, for example, “C:\ProgramFiles\Skype”.

    IMPORTANT. Please note: if there are spaces in the names included in the address, the entire path must be enclosed in quotation marks. If the names do not contain spaces, you can omit the quotation marks with this command.

    The slash can be used either forward or backward (\ and /). Both of them are read by the program in the same way, choose the one that is convenient and familiar to you.

    If you are not sure of the exact name, press TAB then up/down arrows to scroll through the list. Let's assume that you have folders "helloYou" and "helloMe", they are located in "C:\". Type the command "C:\>cd h", then press TAB twice, this will scroll through the list of components starting with the letter "h".

    View content

    To see the contents of a folder, type the “dir” command, followed by the path to it, then the parameters.

    If you do not specify the path, the screen will display a list of contents where you are at that time.

    If you do not enter any parameters, the list will be presented with five columns:

    • date of last modification;
    • catalog date;
    • if the name in the list refers to a folder, it will be ; if it is a different format, there will be an empty space;
    • file/folder weight;
    • number of documents in the catalog, their total weight.

    To avoid details, enter the command with the “/d” parameter - you will simply see a list without additional information.

    Creation

    To appear new folder, type “mkdir”, or simply “md” for short. Next, write down the path to it and its name. For example, in the root of drive C you need to create a subfolder “Russian” in the existing “Test”, which means you type sequentially “mkdir “C:\Test\Russian””.

    You can create several new folders at once; then specify the paths separated by a space or names. Let’s say that in the same “Test” subfolders 1, 2, 3 are required. If you are already in the root of the C-drive, type “mkdir “Test \1” “Test \2” “Test \3””. If you are already in “Test”, you can use a shortened version of the command: “mkdir 1 2 3”. But do not forget: if there are spaces in the names, they will need to be enclosed in quotation marks.

    Removal

    The “rmdir” command or its shortened version “rm” allows you to delete folders and their contents. After that the parameters are written, then the path.

    If you want to delete an empty “Example folder” directory, write it like “rmdir “C:\ Example folder””.

    If the “Example folder” is not empty, it contains subfolders/files, in order to delete everything together, you should enter the “/s” key after the command. The key is entered after “rmdir”, but before the destination address. That is, the entry will look like this: “rmdir /s “C:\Example folder””. After typing the command, you will see a confirmation request, select “y”, which means that you agree to delete (“yes”).

    To prevent the confirmation request from constantly appearing, you can immediately register the “/q” key. It fits after the "/s".

    You can list what you want to delete separated by a space. Let’s say that inside “Test” you no longer need folders 2 and 3, which means you write the command: “rmdir /s /q “C:\Test\1” “C:\Test\2” “C:\Test\3” " If you are already in the “Test” directory, you can enter the shortened version: “rmdir /s /q 1 2 3”.

    Move, rename

    For these two actions there is one command - “move”. After it, the parameters are written, then the path to the moved/renamed folder, then the path to the newly created one. It turns out that to move you first specify the old path, then after a space the place where the directory should move. When renaming, you specify the path with the old name, then after a space the new name.

    Let's look at examples.


    Transitions

    While working through the command line, you want to change to a different directory. The "chdir" command will help you, allowing you to go to another location. Or simply go to the section, as described above in this article, using the “cd” command.

    To move to a subdirectory, it is not necessary to indicate the full address if you are in the parent directory. Let's say you are in "ProgramFile", how do you go to the "Skype" folder in the command line? There is no need to specify the full path: “cd “C:\ProgramFiles\Skype””; Just indicate the name of the subdirectory: “cd “Skype””.

    To go back to the parent directory, type “cd “ProgramFiles””.

    If you need to change the location drive, add the “/D” key, for example, from drive C: you need to go to D:, enter “cd /D d:/”.

    Copy

    The folder itself cannot be formally copied, but you can copy its contents using the “xcopy” command. After it, enter the parameters, then the address of the copied directory, then after a space the address of the new directory.

    Let's say there is a folder “Foto”, you need to copy it along with the contents from “MyFile” to “NB”. We write the command like this: “xcopy /e “C:\MyFile\Foto” “C:\NB\Foto””. The “/e” switch gives the command to copy the internal contents of “Foto”.

    Working with the command line does not require special skills; a novice user will quickly master all the processes if desired, learn to move, rename, open, create, copy, delete any file or directory, move from one place to another. This function is so useful; knowing how to use the program will make it easier and faster for many actions when working on a PC. You just need to remember, save the set of commands, and carefully enter the address of the component with which various actions will be performed.