What the command line should look like. Controlling the display of text and commands


The Windows XP command line is a built-in Windows tool for solving a wide variety of tasks. Using the command line console, you can perform actions that are not possible in the Windows graphical environment. Set up the operating system. For most users, the command line window itself, and especially working with it, causes some fear. But it's not really that scary. Basic knowledge, operating principle, and some commands, can help restore the OS, configure scheduled tasks, and much more.

How to open the command line in Windows XP

There are quite a few ways to call the command line, but we will look at the most common ones:

  1. Through the menu " Start" - where we select " All programs", then click on the menu " Standard", and here we select the command line.

  1. The second method is to call the console through the built-in utility " Execute" - here in the menu " Start" V right column you can find this utility, run it and write the command in the dialog box cmd and click " OK».
  2. Another way to open the window " Execute"and launch the command line through it, this is a key combination Win+R .

There are other ways, but in most cases these three are more than enough. Each user chooses one, more convenient and familiar method.

Settings and working with the command line

Before you get started, you can customize the command line for your convenience.

  • To do this you need to right click on top panel and select the item “ Properties».
  • Here we can make changes to the interface of the window itself - change the color and size of the font, change the font itself, adjust the location and size of the window for convenience. Change window color, background color, text color.

List of command line commands

Now comes the fun part. Teams great amount Of course, you don’t need to know them all. But the main ones basic commands It is desirable to know. And the first question is where to look for them. And here the command line will help you, in which you need to write the command.

A list of commands will open, and there are a lot of them here. View more detailed information about a specific command, you can type in the console:

Help (space, command - for example, dir ) - the command will look like this - h elp dir


Case is not important here; you can write in both small and capital letters.

How to create a folder via command line

Command line capabilities are difficult to describe in one article, so we will limit ourselves to a couple simple examples- how to create a folder or several folders at the same time, which, by the way, is impossible from a graphical Windows environment. And set up a scheduled task to turn off the computer. It is very important when, while watching a movie, you fall asleep and the computer remains on. In this case, you can set a time to turn off the PC and it will turn off according to the schedule.
So let's get started:

  • Open the command line as described at the beginning of the article.
  • First, let's pay attention to what directory we are in, in order to move to some specific folder you need to write the full path to it, in our case it will be “ Rdesk"and the path to it will look like this:

CD "c:\ Documents and Settings \ user \Desktop"

Please note, the command (CD ) is responsible for moving through directories, further if in the addresspresentspaces, then alladdressneeds to be in quotation marks.
Being in the directory, or more precisely, in the folder " Desktop"we can create multiple folders. Like this: - command ( md ) is responsible for creating the folder, but if after the command md We will write several folder names, let’s say these will be the names of planets, then we will create exactly as many folders as we will write them in the command line separated by a space.
Example command to create multiple folders:

m d Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune


And confirm your action with the key Enter . 8 folders will appear on the desktop, with exactly the names that we listed separated by a space after the command. Interesting, isn't it? To create the same number of folders in the usual way, we would need a lot more time and effort creating each folder separately.

Turn off the computer

Now regarding the planned task - for example, we are listening to music in the Winamp player, and we want it to turn off at some point. The standard player can turn off both itself and the computer, but Winamp cannot do this, so it would be advisable to give it a scheduled task to shut down in certain time. How it's done. Windows XP has a great team. It is natural to indicate your own time (in the example, the time is indicated randomly).

Or turn off the computer completely, another command will do for this:

shutdown.exe -s -t 3600

(numbers, means seconds, after how many seconds the computer should turn off, in our case it is one hour or 3600 seconds).
To make it easier to work with commands and command line, you can install the Notepad++ program and write a command in it, and then save it with .cmd or .bat resolution. Then run this file. Then the computer will turn off exactly after the period of time that we set. You can cancel the scheduled task to turn off the computer using the command.

shutdown.exe -a

By the way, having created such a script, you can use it constantly without launching the command line.

The command shell is a separate software, which provides direct communication between the user and the operating system. A text-based command line user interface provides an environment in which to run applications and utilities with text interface. In the command shell, programs are executed and the execution result is displayed on the screen.

The Windows command shell uses a command interpreter cmd.exe, which loads applications and directs the flow of data between applications to translate the entered command into a form understandable to the system. The command line console is present in all versions of Windows operating systems. The difference between working from the command line is complete absence large and cumbersome graphical utilities.

How to open the command line

The command line is the cmd.exe application and can be launched in the following ways:

  1. Start -> All programs -> Standard -> Command line.
  2. Start -> Execute and enter the program name cmd.exe

    In order to go to the desired directory, you need to use the command CD. For example, if you need to run a program ExifPilot.exe, which is in the directory C:\Program Files\Exif Pilot, then you need to run the command cd C:\Program Files\Exif Pilot. You can do the same by changing directories one by one and calling the command one by one CD.

    So, the next set of commands is similar to the previous one.
    cd c:\Program Files
    cd Exif Pilot

    To print the contents of a folder, just type the command dir. It is possible to redirect the stream output by the program directly to a text file for further processing. To do this you need to use a control character ">" and the name of the text file, for example dir > report.txt.

  3. In order not to manually navigate to the desired directory, you can use some file manager. First you need to go to the desired directory in the file manager and call cmd.exe from command console manager
    You can use file managers such as Total Commander , FAR Manager , 2xExplorer, EF Commander, Speed ​​Commander and etc.
    Read more about file managers You can find out .

How to pass command line parameters to the called application

Each application that supports the command line has a special set of commands that the program can process. Command parameters can have the most different format. To pass parameters to the program, you must enter the application name and command parameters on the command line. After clicking Enter The application will launch with the entered commands.
For example, program.exe /print c:\doc\1.txt. The result of the command will be to print the file doc\1.txt.

Customizing the Command Prompt Window

To configure the command line, follow these steps:

  1. Open a command prompt window.
  2. Click left top corner window and select the command Properties.
  3. Select a tab Are common.
  4. In area Remembering commands select or enter a value 999 in field Buffer size and then select or enter a value 5 in field Number of buffers.
  5. In area Editing check the boxes Selection And Quick insert.
  6. Select a tab Location.
  7. In area Buffer size screen, enter or select a value 2500 in field Height.
  8. Do one of next steps optionally.

    - In area Screen Buffer Size Width.
    - In area Window size increase the parameter value Height.
    - In area Window size increase the parameter value Width.

  9. Uncheck Automatic selection, and then in the area Window position change field values Left edge And Top edge.
  10. In the dialog box Changing Properties select an option Save properties for other windows with the same name.

Notes:

  • To open a window Properties -> Command Line using the keyboard, press the keys ALT+SPACEBAR +Y.
  • Checkbox Mouse selection Allows you to copy and paste data in the command line window. To copy, left-click the text in the command line window and right-click. To paste into the command line or text file, click right click mice.
  • Increasing the screen buffer size to 999 allows scrolling in the Command Prompt window.
  • Increasing the number of buffers to five increases the number of lines in the Command Prompt window to 5000.

Editing text in the command prompt window

To copy and paste text into a command prompt window, use common Windows keyboard shortcuts such as Ctrl+C, Ctrl+V, will not work.

To extract text from the clipboard you will have to bring up the menu by right-clicking on the window title and select submenu Change. Or just right-click on the window.

To copy text from the window select the item Flag and use the mouse to select the desired text. Then either click Enter, or in the same menu select Copy. If you need to paste some text into the command line window, refer to the command Insert.

For re-execution teams use the arrows "up" And "down", allowing you to navigate through the list of executed commands. To clear the screen of text, use the directive cls.

How to close the command prompt window

To close the command line console, you need to run the command exit.
There are many commands and utilities in modern operating systems. Remember this amount various programs, and even more so their parameters are very complex, therefore one of the most important parameters for each program is a combination of symbols "/?" . After executing a command with this parameter, the user will receive a comprehensive message about the use of the utility and the syntax of its parameters. For example, by typing on the command line cmd /?, you can view information about the team cmd.

Modern users may find the command line mode very inconvenient, since they need to type unfamiliar commands without making mistakes or typos. However, some computer operations are easier and more convenient to perform using only the command line of the operating system. In some cases this is the only possible way to perform certain actions on the computer. For example, a registry editor in operating systems Windows family quickly launched exclusively from the command line. There is no mention of it in the control panel. Therefore, knowledge of how to open the command line will definitely be useful for all users.


You can run the command line different ways, which will also differ from the version of the Windows operating system used.

Windows 7 and Windows Vista
In these operating systems, you can open the command line in the following ways.

For some actions with the computer in the Windows 7 and Windows Vista operating systems, you must run the command line with administrator rights. To do this in the methods described above, you need to run the program not double click left mouse button, and right single click and then select context menu"Run as administrator" option.


Windows XP
Click the "Start" button and in the list that appears, click on "Run". In the window that appears titled “Run Programs,” type cmd and press the Enter key on your keyboard.

There is another method that works the same on all operating systems of the Windows family.

  1. Press the Win + R key combination. The Win key has the Windows logo and is located on the left side of the keyboard between the Ctrl and Alt buttons.
  2. In the window that appears, in the command line, type cmd and click the “Ok” button in the window or the Enter key on the keyboard.
The command line window looks like this:

Working with it involves typing certain commands. Typing a separate command is completed by pressing the Enter key on the keyboard, after which the command is sent for execution and processed by the computer.

You can get help on the main commands used by typing the word help and pressing the Enter key on your keyboard.

This article will cover the basics Windows command line, namely:

  • Command line concept;
  • Shell Commands Reference;
  • Sequence of events when executing a command;
  • Creating command line scripts;
  • Controlling the display of text and commands;
  • Commands for studying system information;
  • Commands for using the registry;
  • Control system services;
  • Reboot and shutdown systems from the command line;
  • Manage applications and processes from the command line.

Command Line Concept

Command line support is built into the operating system Microsoft Windows and is accessible through a command shell window. The Command Prompt is supported in all versions of Windows and is used to run built-in commands, utilities, and scripts. Despite the power and flexibility of the command line, some Windows administrators never use it. If you have enough graphic tools administration, you can only apply them by clicking the user interface elements.

However, experienced Windows administrators, qualified software specialists technical support and “advanced” users cannot do without the command line. Knowing how to properly use the command line—specifically, which command line tools to choose and how and when to use them so that they work effectively—can help you avoid many problems and ensure smooth execution of your operations. If you support multiple domains or networks, understanding time-saving ways to work with the command line is not only important but necessary to automate daily operations.

With each new version Windows command the line was improved and its capabilities expanded. The command line has undergone significant changes, associated not only with increased productivity, but also with increased flexibility. Now you can use the Windows command line to solve problems that could not be solved in previous versions Windows.

Start the Windows command shell environment different ways, in particular by specifying parameters when starting Cmd.exe or using your own start file stored in the directory %SystemRoot%\System32.

Additionally, the command line can be run in batch mode to execute a set of commands. In batch mode, the command line reads and executes commands one after another.

When working with the Windows command line, you need to understand where the commands you use come from. “Native” commands (built into the operating system) come in two types:

  • Domestic– exist inside the command shell, they do not have separate executable files;
  • External- implemented in separate executable files, which are usually stored in the %SystemRoot%\System32 directory.

Quick reference to shell commands (Cmd.exe)

  • assoc- displays or modifies mappings ( associations) file types;
  • break- sets breakpoints when debugging
  • call- calls a procedure or another script from a script;
  • cd (chdir) - shows the name of the current directory or changes the current directory;
  • cls- clears the command line window and screen buffer;
  • color- sets the text and background colors of the command shell window;
  • sorry- copies files or performs file concatenation;
  • date- shows or sets the current date;
  • del (erase) - deletes given file, a group of files or directory;
  • dir- shows a list of subdirectories and files in the current or specified directory;
  • echo- displays text in the command line window or sets whether commands should be displayed on the screen (on|off);
  • endlocal- marks the end of localization ( local scope) variables;
  • exit- exit the command line shell;
  • for- performs given command for each file in the set;
  • ftype Lists or changes current file types in file extension mappings to programs;
  • goto- specifies that the command interpreter should go to the line with the given label in the batch script;
  • if- executes commands according to conditions;
  • md (mkdir)- creates a subdirectory in the current or specified directory;
  • move- moves a file or group of files from the current or specified source directory to the specified directory. Can also rename a directory;
  • path- shows or sets the command path used by the operating system when searching for executable files and scripts;
  • pause- stops execution batch file and waits for keyboard input;
  • popd- makes current the directory whose name was saved by the PUSHD command;
  • prompt- specifies what text should be shown in the invitation line;
  • pushd- saves the name of the current directory and, if necessary, makes the specified directory current;
  • rd (rmdir)- deletes a directory or a directory along with its subdirectories;
  • rem- marks comments in a batch script or Config.nt;
  • ren (rename)- Renames a file or group of files;
  • set- shows current environment variables or sets temporary variables for the current command shell;
  • setlocal- marks the beginning of localization ( local scope) variables in batch scripts;
  • shift- shifts the position of replaced parameters in batch scripts;
  • start- Launches given program or a command in a separate window;
  • time- shows or sets the system time;
  • title- sets the title of the command shell window;
  • type- shows the contents of a text file;
  • verify- turns on the file verification mode after writing to disk;
  • vol- shows the label and serial number disk volume.

Any syntax internal team (and most external) can be obtained by entering the command name and /? at the command line, for example:

Command shell- a very powerful environment for working with commands and scripts. You can run commands on the command line different types: built-in commands, Windows utilities and command line versions of applications. Regardless of the type, every command you use must follow the same syntax rules. According to these rules, the team name is followed by mandatory or optional arguments. Additionally, arguments can use input, output, or standard error redirection.

Sequence of events when executing a command

  • The command shell replaces any variables entered in the command text with their current values;
  • If a group or chain of several commands is entered, the line is split into individual commands, which in turn are split into the command name and arguments. Next, the commands are processed separately;
  • If a command name specifies a path, the shell looks for the command in that path. If there is no such command in the specified directory, the shell returns an error;
  • If the command name does not include a path, the shell first tries to resolve the command name internally. If an internal command with the same name is found, then an internal command has been called and can be executed immediately. If there is no internal command with the same name, the shell first looks for executable file commands in the current directory, and then in the directories listed in environment variable PATH. If the command file is not in any of these directories, the shell returns an error;
  • If the command is found, it is executed with the given arguments and, if necessary, input is read from the source specified in those arguments. Command output and errors are shown in the Command Prompt window or sent to a specified output and error sink.
  • As you can see, many factors affect command execution, including command paths, I/O redirection, and grouping or chaining of commands.

When working with a command shell, you probably started it by opening the Start menu ( Start) and selecting Programs ( Programs) or All Programs ( All programs), then Accessories ( Standard) and Command Prompt ( Command line). Other ways to start the command line are the Run dialog box ( Starting the program) or entering cmd in another, already open window command shell. These methods allow you to specify arguments when starting the command line: keys that control the operation of the command line and parameters that initiate execution additional commands. For example, you can start a command shell in silent mode ( i.e. disable echo output) with the cmd /q command or to make the command shell execute the given command and exit - to do this, enter cmd /c, followed by the command text in quotes.

IN following example The command shell starts, executes the ipconfig command, outputting the results to a file, and exits:

Cmd /c "ipconfig > c:\ipconfig.txt"

Creating Command Line Scripts

Command Line Scripts- text files with commands that you want to execute. These are the same commands that you would normally enter in a command prompt. Windows shell. However, instead of typing commands every time you need them, you can create a script to do so and make your life easier.

Since scripts consist of standard text characters, they can be created and edited in any standard text editor, say, in Notepad ( notebook). When entering commands, make sure that each command or group of commands that must be executed together is marked with new line. This will ensure they are executed correctly. When you've finished creating the command line script, save the script file with a .bat or .cmd extension. Both extensions work the same. For example, if you need to create a script to display the system name, Windows versions and IP configuration, include the following three commands in the SysInfo.bat or SysInfo.cmd file:

Hostname ver ipconfig -all

Controlling the display of text and commands

Team ECHO serves two purposes: to write text to output ( for example, to a command shell window or a text file) and to enable/disable command echo display. Typically, when you run script commands, the commands themselves and the output of those commands are displayed in a console window. This is called command echoing ( command echoing).

To use the ECHO command to display text, type echo followed by the text you want to display:

Echo The system host name Is: hostname

To control echoing of commands using ECHO, type echo off or echo on, for example:

Echo off echo The system host name is: hostname

To direct output to a file rather than to a shell window, use output redirection, for example:

Echo off echo The system host name is: > current.txt hostname » current.txt

Now let's see how command echoing is suppressed. Start a command shell, type echo off, then other commands. You will see that the command prompt is no longer displayed. Instead, only what is typed in the console window and the output of executed commands appears. In scripts, the ECHO OFF command disables command echoing and the command prompt. By adding the ECHO OFF command to your scripts, you prevent your shell window or file from becoming cluttered with command text if you are only interested in the output from those commands.

Studying system information

Often when working with a user's computer or remote server there is a need to obtain basic information about the system, such as the name of the user registered in it, the current system time, or the location of a specific file. Commands that collect basic system information include:

  • NOW- displays the current system date and time in 24-hour format, for example Sal May 9 12:30:45 2003. Available only in Windows Server 2003 Resource Kit;
  • WHOAMI- reports the name of the user registered in the system on this moment, for example adatum\administrator;
  • WHERE- searches for files using a search pattern ( search pattern) and returns a list of matching results.

To use NOW or WHOAMI, simply type the command in the command shell window and press Enter. The most common syntax for WHERE looks like this:

Where /r base_directory_file_name

Here the /r parameter is specified for a recursive search starting from the specified directory (base_directory) and including all its subdirectories, and file_name is the full or partial name of the file being searched, which may include wildcards: the ? replaces one character, and the * sign replaces a group of characters, for example data???.txt or data*.*. The following example searches the C:\ directory and all its subdirectories for all text files whose names begin with data.

Where /r C:\data*.txt

You can also find files of all types whose names begin with data:

Where /r C:\data*.*

Sometimes you need to obtain information about the system configuration or the system environment. On mission-critical systems, this information can be saved or printed for reference. Listed below are commands that allow you to collect information about the system.

  • DRIVERQUERY- displays a list of all installed drivers devices and their properties, including module name, display name ( display name), driver type and build date ( driver link date). All information display mode (/V) reports the status and state of the driver, startup mode, memory usage information, and path to file system. The /V option also enables output detailed information about all unsigned drivers.
  • SYSTEMINFO- provides detailed information about the system configuration, including information about the version, type and manufacturer of the operating system, processor, BIOS version, memory size, regional settings, time zone, and network adapter configuration.
  • NLSINFO- displays detailed regional information, including default language ( default language), code Windows page, time and number display formats, time zone and installed code pages. This command is only available in the Windows Server 2003 Resource Kit.

To use these commands on your local computer, simply enter the name the required command in the command shell window and press Enter.

Commands for using the registry

The Windows Registry stores configuration information for the operating system, applications, users, and hardware. This data is contained in sections ( keys) and parameters ( values) registry, which are located in a specific root partition (root key), which controls how and when sections and parameters are used.

If you know the paths to the partitions and understand the allowed data types in the partitions, you can use the command REG to view sections and parameters and manipulate them in a variety of ways. REG supports several subcommands:

  • REG add- adds a new subsection or element to the registry;
  • REG delete- deletes a subsection or element from the registry;
  • REG query- displays a list of section elements and subsection names ( if they are);
  • REG compare- compares subsections or registry elements;
  • REG I'm sorry- copies a registry element by specified path partition on a local or remote system;
  • REG restore- writes previously saved subsections, elements and parameters to the registry;
  • REG save- saves a copy of the specified subkeys, elements and registry settings to a file.

System Services Management

Services provide key functions workstations and servers. To control system services on local and remote systems, use the service controller command ( service controller command) S.C., which has a set of subcommands, only part of them is described below:

  • SC config- setting up accounts for registering and running services;
  • SC query- display a list of all services configured on the computer;
  • SC qc- displaying the configuration of a specific service;
  • SC start- starting services;
  • SC stop- stopping services;
  • SC pause- suspension of services;
  • SC continue- resumption of services;
  • SC failure- specifying actions to be performed when a service fails;
  • SC qfailure- View actions taken when a service fails.

You can specify a name in all commands remote computer, whose services you want to work with. To do this, insert the UNC name or IP address of the computer before the subcommand you are using. Here's the syntax:

Sc ServerName Subcommand

Reboot and shutdown systems from the command line

Systems often have to be rebooted or shut down. One way is to use Shutdown utility, which allows you to work with local and remote systems. Another way to control system shutdown or reboot is to assign a shutdown task. Here you can use Schtasks to specify a shutdown time, or create a script with a list of shutdown commands for individual systems.

The following commands allow you to control the reboot and shutdown of the local system.

Shutting down the local system:

Shutdown /s /t Shutdown Delay /1 /f

Shutdown /r /t Shutdown Delay /1 /f

Application, process and performance management

Whenever the operating system or user starts a service, application, or command, Microsoft Windows starts one or more processes to manage the associated program. Several command line utilities will make it easier for you to monitor and manage programs. These utilities include:

  • Pmon (Process Resource Manager) - Shows performance statistics, including memory and CPU usage, and a list of all processes running in local system. Allows you to receive detailed " pictures» resources involved and processes performed. Pmon comes with the Windows Resource Kit;
  • Tasklist (Task List) - lists all running processes by name and process ID, reports information about the user session and occupied memory;
  • Taskkill (Task Kill) - stops the execution of a process specified by name or identifier. Using filters, you can stop processes depending on their state, session number, CPU time, memory footprint, user name, and other parameters.

That's basically all I wanted to tell you about the basics of the Windows command line.

Ever since the computer became an integral part of the life of modern society, we have become accustomed to working in a visual graphical interface. In simple terms this means clicking on pictures, dragging them, etc. But at the dawn computer technology everything was different. Then commands to the machine were given exclusively in text mode. Even now, programmers and so-called advanced users can easily communicate with their computer using text commands.

Sometimes the ability to use this mode can greatly simplify life, and in some cases it becomes simply necessary. Therefore, in this article we will discuss what the command line is in Windows 7, how to open this line and why you might need it.

Translator from human language to computer

To enable the computer to understand user requests, operating system There is a special command shell where the Windows 7 command line plays the role of a translator. In this sense, of course, life is easier for English-speaking people, since the commands are written in the purest English language. Well, the rest will have to learn a couple of dozen foreign words.

in Windows 7. How to open this tool

First, let's figure out how to launch the input environment we need. There are several ways to open the Windows 7 command prompt.

To use the first method you will have to remember the simplest command- "cmd". It's not difficult to do this. These letters are a computer abbreviation for the English word command, which is very similar to the Russian “command”. Using the simplest examples of mnemonics, we get the letters we need ( TO O M en D naya).

Click on the Start button ( Windows icon), which is located in the lower left corner of your screen. In the window that opens, in the “Search programs and files” line (bottom line), enter the “cmd” command. In the list of programs that appears, it will appear desired icon. By left-clicking on it, you can launch the Windows 7 command line.

The next way to open the command line also starts from the Start button. But this time you can simply click on the “All programs” line in the list and select the “Standard” folder. By clicking on a folder, you will get a whole range of programs. One of them will be “Command Line”.

Command Prompt in Windows 7. How to open using a standard keyboard shortcut

You can achieve the desired result using the keyboard shortcut “Win” + “R”. (The “Win” key is located on the keyboard in the bottom row, third from the left, with the Windows logo). By clicking this combination, you will open a special “Run” window. In the field provided, you need to enter the command “cmd” that you are already familiar with and press the “Enter” key.

Why you might need the command line

Let's say you use trial period free acquaintance with the Windows 7 operating system. It is already coming to an end, but you have not yet fully understood whether it is worth transferring it to permanent basis. This is where command line knowledge comes in handy.

Microsoft has provided an absolutely legal opportunity to activate Windows 7 for an additional period (up to 120 days). In this case, the command line will be needed to enter the code. You can set such a command only as an administrator. This precaution is by no means superfluous. After all, many specific changes to the operation of the computer can be introduced using the Command Line program. must clearly understand what his actions will lead to.

To log in with administrator rights by calling the program using one of the previously described methods, right-click on it and in the context menu that opens, select “Run as administrator” (at the very top of the list).

After that, in the window that opens, enter “slmgr.vbs /rearm” (there should be a space after the letters “vbs”). And confirm the command by pressing the Enter key. Restart your computer and check the trial expiration date. It must be 30 days. This procedure can be repeated, but no more than three times. So in total you will get 120 days to explore the capabilities of the operating system.

List of basic commands

The command line in Windows 7 will also help you perform many basic and specific functions. You will learn from the following list of commands how to open the desired directory or folder and carry out the necessary operations with them. And although it is far from comprehensive, knowing this basics can make your life a lot easier one day. To make it easier to understand, let's try to group the commands into small blocks.

Commands for working with individual files and folders

  • If you need to delete a file or an entire group of files, use the “del” command.
  • To copy information to another folder or directory, use the “copy” command.
  • To find a given file in the current file (or group consisting of several files) text string, type "find".
  • If you need to compare multiple files to find differences between them, use the letter combination "fc".
  • To move the specified files to another folder, type “move”.
  • To create a new empty folder, just give the request “md”.
  • If you need to permanently delete a folder along with all its contents, use “rd”.
  • If you need to print text or graphic information from specified file, type "print".
  • To completely replace the selected files, use the “replace” command.
  • To rename separate file or folder, enter "ren".
  • To see a complete report of the graphical directory structure of a drive or folder, use the "tree" command.
  • Sometimes it is necessary to run an improved means of copying files and even complete directory trees. In this case, type “robocopy”
  • And for simple copying files and directory trees, "xcopy" is used.
  • If you want to see the full contents of the specified text files on your screen, issue the "type" command.

Command line management

To directly control the command line itself, a number of specific commands are used. Thanks to them, you can personalize your work with this program to some extent by changing some of its parameters.

  • To launch a second additional copy of the command line, enter "cmd". It will open in the next window.
  • To completely clear the command line screen, issue the command "cls".
  • If you need to change the prompt itself on this command line, enter “prompt”.
  • To assign an original title to the window for the duration of the current session, command "title".
  • The “color” command allows you to select and set an individual text color and background for the program interface.
  • Exiting the command line is always done using the "exit" command.

Features of working with the command line in Windows 8

In the operating room Windows system 7, launching the command line as an administrator is relatively simple. But in order to open this program in Windows 8, you need to know some news and subtleties of this shell.

Windows 8 does not have a Start menu. In order to call the panel we need, we need to right-click on any empty area of ​​the desktop. After this action, an additional panel will appear at the bottom of the screen, on which you will find the “All applications” icon (lower right corner).

Open applications (by left-clicking on the icon) and look for an icon in the list that appears that says “Command Prompt” (it will be located approximately in the central part of the panel). Click on this icon with the right mouse button (if you use the left key, then by default the command line will open as current user) and in the additional option that appears below, select the “Run as administrator” option.

Timely assistant

Although working with the command line is generally considered to be the privilege of experienced users, in fact, anyone can master this tool. And the built-in assistant will provide invaluable assistance in learning. It is called very easy to remember text command"Help".

When working with the command line, you can specify the “Help” command at any time - and the program will give you full list your capabilities. In order to get more detailed information about any specific command that interests you, just enter a request in the format “help + command name”.

So don't be afraid to experiment and expand your horizons. Explore the possibilities own computer or a laptop - and in the near future you will be able to easily talk on equal terms with those who have received a specialized education.







2024 gtavrl.ru.