Dos command prompt on Windows

Very often, in the various Windows guides, we talk about the command prompt, that is the ancient black window that allows you to launch operations on the computer by writing commands with the keyboard.
This command-line interface is seen by the less experienced as something incomprehensible and difficult to use but since it is still indispensable today for doing diagnostic operations, it is important at least to understand what it is in order not to be frightened when asked.
You cannot make a detailed command prompt guide on a blog page because you should explain one by one the DOS commands (the Windows programming language) that you can run on the command line, with all the available options.
For a more simplified approach, the important thing is to know how to open the command prompt, how to write on it and what it means to write a command to launch an operation .
READ ALSO: best tricks for the Command Prompt
The DOS command prompt can be opened, in any version of Windows, from the menu Start> Programs> Accessories> Command Prompt or by pressing on Run and writing cmd
On Windows Vista and Windows 7 the prompt is protected from system changes therefore, to open it productively, either disable the UAC control or, whenever you have to open it, you have to press it with the right button and select " Run as administrator " .
What opens is an ugly black window with writing
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C: \ Users \ username_ _
The flashing cursor is ready to receive the instructions to be given with the keyboard.
The important thing to know is that, where C: \ Users is written, you specify the path or the folder from which to start a command or a program.
So, to launch a program that is in other folders, you have to move in that path.
For example, writing cd C: / moves to the C: / folder, as if you were navigating through Windows windows (before Bill Gates invented windows, this was the only way to explore computer resources).
By typing the simple dir command, you get the list of files and other folders inside the one where you are.
In Windows 7 and Vista then you can open the command prompt from any folder .
Just hold down the Shift and Control keys and then right click on a folder to see, in the menu, the option " Open command window from here ".
If you open the dos prompt from a folder where there is a program, just type in the file name to open that program.
For example, from the folder C: \ Program Files \ Internet Explorer you can launch iexplore to open Internet Explorer.
The only problem is understanding which is the startup file of a program which, almost always, is the executable, the one with the .exe extension.
Fortunately, Windows system commands are executed without having to move to the path where they reside and can be launched from anywhere.
For example, from any Dos window you can write notepad to open the notepad.
For the standard command prompt there are options that make writing DOS commands more convenient.
In the upper part of the window, press the right button and choose " properties " to change the color and where to enable the rapid insertion method . At the command prompt you can copy and paste only by selecting the words with the mouse and pressing the right button. The typical Windows menu does not appear but the text is copied and you can always paste it with the right button.
So if you have to type a long command taken from a website, you don't have to write it by hand, just copy it and then paste it.
READ ALSO: Options to customize the command prompt in Windows 10
To understand what happens by typing a command on the dos prompt, just open the properties of a desktop shortcut of any program. In the properties of the links there is the target line that specifies the command to be launched on the computer. If you try to copy and paste that row on the dos prompt, you get the same result as when you double-click on a link.
If you have to run a long command, you can write it on the notepad and save the file, not as a text document but as a .bat file (just give it the name like foo.bat). When you run a .bat file, it opens the command prompt window.
There are several alternative and easier-to-use programs for those who rightly find the classic prompt very limited.
On Windows 7, Windows 8 and Windows 10 there is already Powershell, an enhanced prompt, more beautiful to look at and that uses different commands.
READ ALSO: Difference between Powershell and Windows Command Prompt .
Microsoft has also released the new Terminal, the evolution of the Command Prompt for Windows 10 .
The most professional program is Cygwin, opensource, used mainly in Linux environments and if you want to control Linux machines from Windows.
Console and PowerCMD are, however, two programs to open the command prompt, tabbed (like a web browser), with support for normal copy and paste, with drag and drop to open folders on the dos prompt and with the ability to save sessions, which is impossible on the normal Windows prompt.
To find out what dos commands can be launched, you should rely on the guides on reliable blogs and forums.
By writing help on the Dos prompt, you can read a list in Italian with the guide of the most used commands .
For example, it reads:
  • CD : Displays the name of the current directory or allows you to switch to another directory.
  • CHKDSK : Checks a disk and displays its status report (Start Scandisk).
  • COPY : Copy one or more files to another location.
  • DATE : View or set the date.
  • DEL : Delete one or more files.
  • DIR : Displays a list of files and subdirectories in a directory.
  • ECHO : Display messages or activate and deactivate repetition
  • FIND : Searches for a text string in one or more files.
  • FORMAT : Formats a disk for use with Windows.
  • MKDIR : Create a directory.
  • MKLINK : Create symbolic and real links
  • MOVE : Move one or more files from one directory to another (cut and paste)
  • RENAME : Rename one or more files.
  • SHUTDOWN : Allows the computer to shutdown properly.
  • TASKLIST : Displays all running activities including services.
  • TASKKILL : Stops or stops a process or application.

For each command, for example writing cd / ">
Another important thing to know to use the command prompt correctly are the keyboard shortcuts for the Function keys .
To be precise, we have the following uses:
  • F1: retype the last command used, character by character
  • F2: ask for a character, then retype the last command used until the first occurrence
  • F3: completely retype the last command used.
  • F4: requires one character, so delete all characters in the current command.
  • F5: Complete previously used commands again.
  • F6: writes ^ Z
  • F7: presents a menu of previously used commands.
  • F8: Completes the previously used commands again, cyclically.
  • F9: completely copies a previously used command, corresponding to the number in the menu presented by F7.

If you have questions, however, let us know, the important thing now is that, the next time we need to run a command from the dos prompt, we will know what we are doing without being horrified or frightened.
READ ALSO: 15 Main commands of the Windows prompt

Leave Your Comment

Please enter your comment!
Please enter your name here