Adding an "Open Command Window" option to the Windows Explorer context menu. How to open a folder in the command line on Windows

Adding an "Open Command Window" option to the Windows Explorer context menu. How to open a folder in the command line on Windows

First, as general information, I will explain, how to open command prompt as administrator. It's simple: search for cmd in Start → open the context menu → click "Run as administrator". Pictures below.

In Windows 8, the command line is also found by search, and the instructions take touch screens into account.

Open a command prompt in the desired folder

We open the command prompt to run a command. When a program or script is located outside of the location known to the system (they are listed in the PATH variable), you have to enter the full path to it. Running the command line in the desired folder saves time on entering the path.

The easiest way to launch a command prompt in the current folder is to go to the address bar of Explorer, enter cmd and press Enter!

For mouse enthusiasts there are context menus.

Context menus in Windows 7, 8/8.1 and 10 before version 1703

In these operating systems, just right-click on or inside a folder while holding down the Shift key to display the “Open command window” option in the context menu.

As you can see in the picture above, the command prompt immediately opens in the desired folder.

Context menus in Windows 10 1703 and later

In version 1703, Microsoft decided to promote PowerShell and brought this console instead of CMD to the context menu. You can open PowerShell and type cmd. You can add a separate item for the command line using a registry tweak - download.

Open a command prompt with administrator rights in the desired folder

The Command Prompt is an administrative tool, and many tasks performed in it require full administrator rights. If User Account Control is disabled (although it's not that bad at all), the Command Prompt will immediately launch with full rights.

But for those who are used to controlling the behavior of the system, the above method is often useless, since they open the command line with normal user rights.

Windows 8 and Windows 10 up to version 1703

Starting with Windows 8, running the console as an administrator is built into File Explorer, and the task can be launched using a keyboard shortcut. This eliminates the need to use the context menu, although the method below will also work.

In Windows 10 1703, Microsoft removed the command line from the File menu, leaving only PowerShell. Again, you can open PowerShell and type cmd.

Windows 7 and later

This method works on all supported Microsoft operating systems. I have prepared a set of files with which you can instantly create in the context menu of the folder, folder background (including desktop) and disk“Open a command window as administrator” item with the User Account Control icon.

Moreover, when calling the context menu, you do not need to hold down the Shift key to see this item. Adding such an item to the menu is very simple.

  1. Download and unzip this archive anywhere.
  2. Right click on the file ElevateCommand.inf, select a command Install and agree to the installation.
  3. Do the same with the file CmdHereAsAdmin.inf.

Ready! If you want to remove this item, open Start - Search - Installation and removal of programms and uninstall both PowerToy programs.

These files are from the Elevation PowerToys set, which I already mentioned in the story about UAC. I just selected the necessary files, Russified them, added an icon to the menu and improved the display of the menu item.

Setting a menu item

If you want to change the item name and/or icon, drag the file into Notepad CmdHereAsAdmin.inf and edit the last two lines.

You can make it so that to display the “Open command window as administrator” item, you need to hold down the Shift key when calling the context menu, as is done when calling the command line. To do this, in the section "uncomment" the commands that follow my comments by removing the semicolon ( ; ) at the beginning of the line.

After making changes, simply install the file again CmdHereAsAdmin.inf.

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 the graphical interface. Moreover, in some cases the command line is simply not replaceable. For example, such popular utilities as Ping or Ipconfig are launched only on the command line. In this article we will talk about how to open the command line in Windows 7.

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

You can use it to launch 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 “Command Line” program 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 enter “Command Prompt” in the search bar.

The operating system will then 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 method in Windows 7. To use this method, you need to press the Windows + R key combination and enter the “CMD” command in the window that opens.

After entering this command by pressing the enter button, the Windows 7 command line 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, then you can. To do this, right-click on the desktop and select “Create – 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 “Done” button again.

That's it, after these steps a shortcut to open the command line will appear on the desktop. Using this shortcut, you can open the command line just like all other programs.

If necessary, you can specify a key combination for the shortcut, which, when pressed, will open the program automatically. To do this, open the properties of the command line shortcut and place the cursor in the field opposite the “Shortcut” item.

After that, click on any button. For example, let’s click on the button with the letter “C”.

As a result, the shortcut will be assigned the key combination Ctrl+Alt+C. To save changes, close the shortcut properties window by simply clicking on the “Ok” button. Now, when you use the combination Ctrl+Alt+C, the Windows 7 command prompt will open automatically.

Good afternoon, dear readers of the blog site, today I want to talk about the topic How to open the Windows command line / 10 ways to open the command line. What is cmd, that's what Wikipedia tells us.

cmd.exe- command line interpreter (English) command line interpreter) for operating systems OS/2, Windows CE and for a family of operating systems based on Windows NT (eng. Windows NT-based). cmd.exe is analogous to COMMAND.COM, which is used in the MS-DOS and Windows 9x families. Operating systems of the Windows NT family for the IA-32 and OS/2 architecture also have COMMAND.COM for compatibility with older programs. In the interpreter settings, it is possible to change the cursor size, font, text color and window size.

Let's look at how to open it.

How to open command prompt as administrator

Below we will look at ten ways I know how to open the command line as an administrator.

1 way to launch the command line. Before Windows 8 (unless you have to return the start button)

To open the command line, click start and enter cmd in the search field, the program icon to launch will appear at the top

or enter command line, the effect will be the same

If you need to open cmd on behalf of the Administrator, then this is done with the right button and selecting

In Windows 10, the search looks like this: you click on the magnifying glass icon and write cmd. The search result will appear at the top.

Method 2 is by using Run

Press two magic buttons win+R

The Run window will open, type cmd and press Enter.

3 The way to open the command line is through the Windows folder

Open My Computer and go to the path C:\Windows\System32 and find the cmd.exe file there. The method is not the fastest, but anyone can handle it. The essence is simple, the command line, like all utilities, has its own executable file. We find it and launch it, do not forget about the right click and the context menu with administrator mode.

4 The way to call cmd is to create it via a shortcut

In this method, we will create a Windows shortcut for the task at hand. Right-click Create-Shortcut

Specify the location of the file, write cmd here

How to name the shortcut is up to you, I’ll call it cmd too, Done

And we see that a command line shortcut has been created

5 Method to launch the command line, through the task manager

Open the task manager by right-clicking at the bottom of the screen

Go to the menu File-Run new task

We write cmd in the task and click OK and enable the command line.

6 Method to launch the command line, for those with Windows 8 and higher

We go to Start and click on the magnifying glass at the top right, or the magnifying glass can be called up from the side menu on the desktop

We enter cmd and in the search results we see the shortcut we need.

You can also press the down arrow in Start.

The start menu structure will open in which by scrolling to the right you will find the command line

7 Method to launch the command line, for those with Windows 8.1 and higher

Right-click on Start and select Command Prompt

Method 8 through standard programs in the start up of Windows 8

Open start all programs

Go to Tools - Command Prompt

9 Method using the Explorer menu in Windows 8, 8.1 and 10

Open any folder and click on the File menu on the left

and select open command line, you will immediately be offered two options: simple opening or as Administrator.

The trick is that the command line will open the current directory, not the user's folder.

Method 10 via the Shift button

Select any folder, hold Shift and right-click and from the context menu select Open command window

Launch using voice assistants

In an era when people have become so lazy that it is already difficult for them to enter something on a computer and phone. Voice assistants have arrived, Cortana, Alice, Google Assistant, they all allow you to perform various actions using your voice. Depending on what voice assistant you have, you'll need to say a magic phrase to activate it, then ask it to open a command prompt for you. Let me remind you that Cortana is only available in Windows 10.

Here we have figured out how to open the Windows command line, which method is right for you, I don’t know, I just know that there is a choice.

More than one generation of Internet users has already grown up who did not see the beginning of the rapid rise of Microsoft Corporation and do not even know how to open the command line.

A feature of this early version of the Windows operating system, which was called MS DOS, was single-tasking (all processes were performed sequentially, not in parallel) and a predominantly text-based interface.

Nowadays, most operations on a computer running Windows can be performed solely with the mouse, but in those days, even the simplest actions required knowing a lot of complex text commands.

Via a shortcut in the Start menu

Running the Run program to open the command line is a strange idea, since the required shortcut is right next door.

You can also quickly find it by searching in the Start menu.

Due to a significant change in the Start menu interface in Windows 8, this method will be implemented slightly differently.

  • First you need to go to the application tiles (new version of Start) and right-click on the free area. As a result, a panel will pop up at the bottom, providing advanced options.
    In it you need to click on the All applications icon in the lower right corner.

  • Here you can see a list with additional hidden applications, including the Command Prompt shortcut. Now you need to click on the required shortcut with the right mouse button and select the run as administrator function in the bottom panel.

Advice! Running with administrator rights is recommended because some commands simply will not run normally.

In Windows 10, search works across the entire system. Therefore, to quickly find the command line, you need to press the Win+S combination and enter the name of the program, in this case it is the command line.

Searching for an executable file on the system disk

As mentioned above, the command line is implemented through a small executable file cmd.exe.

From here we can draw a logical conclusion that this executable can be found in some folder and launched directly.

This is true, the command line executable file starting from seven is stored in the System32 subdirectory of the Windows folder.

Hidden menu in Windows 8 and Windows 10

In the last two versions of the world's most popular operating system, there is a hotkey combination to open a special menu for advanced users, which contains all the most necessary system utilities.

It opens by pressing the Win+X keys, and there is just a place in it for the command line.

Via the context menu in Windows 10 Explorer

The top ten has its own unique way of calling the command line. It consists of calling this function through Windows Explorer.

To do this, you need to open any folder and, while holding down the Shift key, right-click in any free area of ​​this folder.

As a result, an extended context menu will open, which will have the option to call the command line.

As you can see from the methods mentioned in this article, the command prompt in Windows operating systems can be accessed in many ways.

This seems for such a small program of several hundred kilobytes and with unclear functionality.

But such misunderstanding can only arise among inexperienced users.

Those people who have been actively using a computer for work and entertainment for many years understand perfectly well that cmd.exe is a powerful tool that can instantly produce results if you know how to use it.

That is why the latest versions of Windows, focused on cross-platform (and primarily on compatibility with devices with a touchscreen), not only did not lose this function, but also acquired additional features for convenient work with it.

How to Open Command Prompt in Windows

This video discusses several ways to open the command line in Windows 7. In Windows XP, Vista, the command line opens in the same way.

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 create a 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 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.

views