It 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 the actions with files, directories. How to open folders via command line, in general, creating them, working with them, including moving, renaming, how to delete a folder through the command line that is already unnecessary - you can resolve these issues by reading the article. The problem looks worse than it really is. The main thing here is to know the commands, correctly enter the address of the document. Below we will consider the main operations, you can see for yourself that there is nothing super complicated here.

There are several tricks to help you get started with the command line. You can open it like this:

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

Opening an existing folder

To open a folder, you must specify the path to it on the command line. First, enter the “cd” command, and then after the 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 not type quotes 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 a convenient, familiar one for you.

If you are unsure of the exact name, press TAB then the up/down arrows to scroll through the list. Suppose you have "helloYou" and "helloMe" folders located in "C:\". Type "C:\>cd h" then press TAB twice to scroll through the list of components beginning with the letter "h".

Browsing content

To see the contents of a folder, the “dir” command is typed, after which the path to it is entered, then the parameters.

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

If you don't enter parameters, the list will be presented with five columns:

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

To avoid detailing, enter the command with the "/d" parameter - you will see just a list without additional information.

Creation

To create a new folder, "mkdir" is typed, or simply "md" can be abbreviated. Next, the path to it, the name is written. For example, in the root of drive C, you need to create a subfolder “Russian” in the existing “Test”, which means you type “mkdir “C:\Test\Russian” in sequence.

You can immediately create several new folders, specify the paths then separated by a space or names. Let's say 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 the 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

Delete folders, their contents allow the command "rmdir" or its shortened version "rm". After the parameters are prescribed, then the path.

If you want to delete an empty directory "Example folder", it is written according to the pattern "rmdir "C: \ Example folder"".

If the “Example folder” is not empty, it contains subfolders / files, in order to delete everything together, you should prescribe 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 prompt from constantly appearing, you can immediately register the “/q” key. It fits after "/s".

You can list the deleted items separated by a space. Suppose you no longer need folders 2 and 3 inside “Test”, so 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 shorthand: "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 formed folder. It turns out that to move, you first specify the old path, then after the space, the place where the directory should move. When renaming, you specify the path with the old name, followed by a space with the new name.

Let's look at examples.


Transitions

Working through the command line, you wanted to change to a different directory. The "chdir" command will help you, allowing you to go to another location. Or just go to the section, as described in this article above, using the "cd" command.

To go to a subdirectory, it is not necessary to specify the full address if you are in the parent. Let's say you're in "ProgramFile", how do you go to the "Skype" folder on the command line? You don't need to specify the full path: "cd "C:\ProgramFiles\Skype""; it is enough to specify the name of the subdirectory: "cd "Skype"".

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

If you want to change the location disk, the “/D” key is added, for example, from drive C: you need to go to D:, write “cd /D d:/”.

copying

The folder itself cannot be formally copied, but its contents are allowed to be copied, for which the “xcopy” command is used. After it, the parameters are entered, then the address of the copied directory, then after the space, the address of the new directory.

Let's say there is a folder "Foto", it was necessary 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 instructs 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 how to move, rename, open, create, copy, delete any file or directory, move from one place to another. Such a function is useful, the ability to handle the program will facilitate, speed up many actions when working on a PC. You just need to remember, save the set of commands, carefully enter the address of the component with which various actions will be carried out.

Command line - special program, which allows you to control the operating system using text commands entered in the application window. Its interface is completely text-based, unlike the usual look of the operating system.

Performing actions using text expressions, of course, is not as convenient as clicking icons on the screen, selecting menu items, opening program windows. But sometimes it is simply necessary to open the command line, for example, in case of problems in the system, working with network and equipment settings, calling system applications. Here are some examples of its use:

  1. The systeminfo command collects information about the system, including installed updates and network information. The graphical interface does not provide such data.
  2. chkdsk - check the disk for errors with the creation of a report.
  3. sfc /scannow- useful command launching a scan and repairing damaged files.
  4. ipconfig - allows you to find out the IP address of your computer in a split second.
  5. ping - check network operation in case of problems with the router.
  6. help - the command line will display a list of possible commands with brief information about them.

These are just a few examples of useful uses for this application. In addition, through the program window, you can quite successfully work on a computer without resorting to the mouse.

Ways to turn on

There are several options to open the Windows Command Prompt:

In a version higher than Windows 8, in order to apply this method, you need to click on the magnifying glass next to the username.


Also for quick start you can create a desktop shortcut and hotkeys. You can create a label like this:

  1. In the explorer window, find the folder "Windows \ System32", in it right click mouse click on the file cmd.exe, then "Create Shortcut" and select a name for it.
  2. Right-click on an empty space on the screen, in the context menu, find "Create Shortcut". In the field that appears, type C:\Windows\System32\cmd.exe. Next, select a name and click OK.

Now you can assign hotkeys. call context menu created shortcut, click "Properties", "Shortcut" tab, in the " Quick call» enter the desired combination.

Please note that when launched using a shortcut, search window and explorer, the command line is launched from the System32 folder, and using the Run item of the Start menu from the Users folder on your computer.

Opening with elevated rights

Among the methods discussed, some allow you to enable the command line as an administrator. The fact is that even if in the current work you use account Administrator, you do not have full rights to manage the system. This is done to improve reliability and reduce the risk of damage from malware.

The command line is a text-based interface for managing the operating system. In many situations, the command line allows you to perform actions on the system much faster than using GUI. Moreover, in some cases, the command line is simply not replaceable. For example, popular utilities such as Ping or Ipconfig only run on the command line. In this article, we will talk about how to open the command prompt in Windows 7.

Method number 1. Open the command line through the Start menu.

With the help you can run any program and the command line is no exception. Open the Start menu and go to All Programs - Accessories. In the list of programs that opens, find the program "Command Prompt" and click on it.

In addition, you can use the search bar, which is located in the Start menu. To do this, open the Start menu and type "Command Prompt" into the search bar.

Thereafter operating system will find the command line and display it in the search results.

Method number 2. Open the command line in Windows 7 using the Run menu.

The "Run" menu is another popular way in Windows 7. In order to use this method, you need to press the key combination Windows + R and enter the "CMD" command in the window that opens.

After entering this command by pressing the enter button, the Windows 7 command prompt will open in front of you.

Method number 3. Create a shortcut to open the command line.

If you need to use the command line regularly, you can . To do this, right-click on the desktop and select New - Shortcut. In the window that opens, enter the command "CMD" and click on the "Next" button.

After that, enter the name of the shortcut and click on the "Finish" button again.

Everything, after these steps, a shortcut will appear on the desktop to open the command line. With this shortcut, you can open the command prompt just like any other program.

If necessary, the shortcut can be set a key combination, when pressed, the program will open automatically. To do this, open the properties of the command line shortcut and place the cursor in the field opposite the "Shortcut" item.

Then press any button. For example, let's click on the button with the English letter "C".

As a result, the shortcut will be assigned the key combination Ctrl+Alt+C. To save the changes, close the window with the properties of the shortcut by simply clicking on the "Ok" button. Now, when using the Ctrl + Alt + C combination, the Windows 7 command line will open automatically.

To do this, in Windows XP, click the "Start" button, then "Run" and type "cmd" there. In Windows 7 - the "Start" button, enter "cmd" in the search field, right-click on the result that appears and select launch from. When prompted to start, click Yes.

Now you need to find the directory in which the problem is located file. Initially, you are in the system directory "C:\Windows\System32". For the contents of the directory, type "dir / p" ("p" is responsible for paging) and the computer will give you a list file ov and subdirectories, to go to the next page, use the Enter button. In Windows 7, "p" is optional, since this OS has the ability to scroll the contents of the command lines. To display directories alone, use the "/ad" ("dir /ad") key, only file ov - the key "/b" ("dir /b").

To move to a directory, use the cd command.< путь к каталогу >” (for example, typing “cd C:Windows” will take you to Windows directory, from the initial one you can also get there "cd ..", which serves to go back one level). If you need to change the disk - enter "< >:" (for example "D:").

Now that you have found the directory, and in it you need file- it remains only to enter the name of this file a. The file will be opened using a program that, according to the set parameters, should open it. In the future, it is not necessary to go to the directory with file oh, just remember the full path to it (see the image for the step).

What is command line? This is just a software shell that allows you to control some PC functions through text queries. Moreover, before it was the only way to perform a particular function. Now almost everyone uses user-friendly interface, but the string remains, and it is quite simple to use it.

How to open command line?

How to Open Command Prompt in Windows XP

In principle, the methods for opening the command line are similar to each other. Differences can only be in the interface itself and inscriptions. In order to open a command prompt in Windows XP, you can use the standard start menu. Then follow "all programs" - "standard" - "command line".

The same can be done by combining WIN keys+ R. In the window that opens, type cmd and click OK.

How to Open Command Prompt in Windows 7

Since the operating Windows system XP is somewhat similar to Windows 7, the methods are applicable in both cases. The only difference is that the standard menu method may not work because the menu is slightly different in Windows 7. Then you can use the normal search. Just in standard search type cmd command.

How to Open Command Prompt in Windows 8

In Windows 8, you cannot use the standard menu, since it simply does not exist here. At the bottom of the desktop there is an icon - "all applications". We click on it and look for the menu item "command line".

You can also use the WIN + R key combination method.

How to run command prompt as administrator?

How to open command prompt as Windows Administrator XP and Windows 7

It's very easy to run Command Prompt as an administrator in Windows XP, just like in Windows 7. Through the standard start menu, launch the command line, as described above and right-click on the item, select "run as administrator".

You can do the same, but using the desktop. Create a shortcut and name it "cmd.exe". Right click on it and select "run as administrator".

How to open command prompt as administrator Windows 8

With Windows 8, things are a bit more complicated. This can be done here using the task manager. And so we start the task manager, click File then Run new task. In the window that opens, enter cmd and a little lower check the box next to Create a task with administrator rights and click OK.

Through the explorer, open "My Computer" and select local disk, then follow this algorithm: File->Open Command Prompt -> Open Command Prompt as administrator.

The same can be done using the WIN + X keys. After pressing this key combination, a menu will appear in which we select the “command line (administrator)” item.

As you can see, each of these methods is quite simple and does not require special knowledge or skills.