Windows command line current user. Basic commands for working with system directories


I recently grew from a fierce nerd in a very large company to a modest system administrator overseeing a network of 10 PCs. And, like a very lazy system administrator, I was faced with the task of automating my activities. Six months ago, I didn’t yet know that there were pipelines in the Windows command line. This was the first shocking discovery. And I went further, and it turned out that where I had previously written utilities in C#, Delphi or cumbersome scripts with nested loops, I could get by with a couple of forfiles or robocopy commands.
I won’t talk about banalities, such as listing files and folders using the Tab key. Under the hack I’ll tell you about what can be useful for novice admins and enikeys.

Hotkeys
Let's start with hotkeys, because first we need to explore what the work environment can give us.

F1- In the console, this key works exactly like the right arrow, i.e. displays one character at a time from the last command entered (or selected in the history).
F2+<символ> - Prints the last command entered up to the specified character. For example, if the last command you entered looked like this:
ping 192.168.25.1
then after pressing the key combination F2+5 You'll get:
ping 192.168.2
F3- Displays the last, and only the last, command in its entirety.
F5- Displays the last commands entered in order, just like the up arrow.
F6- Inserts the EOF character on current position command line, which is the same as pressing Ctrl + Z.
F7- A dialog box containing the command history.

Alt+F7- Clears command history.
<символ(ы)>+F8- Iterates through commands that begin with characters already entered into the command line.
If before pressing F8 do not enter anything, then this key will work like the up arrow, but with a slight difference - the lines will be cycled through, i.e. after the first command from the list the last one will be displayed.
F9+<число> - Inserts a command from history under the corresponding number. For example, in the situation shown in the screenshot above, when you press the combination F9+4 the following will appear in the console:
ipconfig

Command Line Operators
A long time ago, when I was little, I couldn’t even imagine how you could work in the console without GUI. After all, the output of commands sometimes takes dozens of pages, and if you need to select some data from there, then page-by-page output will not save you. But one day I installed FreeBSD on my old computer, opened the handbook and was simply dizzy with the possibilities that opened up. There you can redirect the output of a command to the input of another command and this is called a pipeline.

The pipeline operator in *nix and cmd is the vertical bar character.
For example, the command will display all text files in the current folder
dir | find ".txt"

Command concatenation operator
&
Example: Command1 & Command2 – Command1 will be executed first, and only then Command2
Operator AND
&&
Example: Command1 && Command2 - Command2 will only be executed if successful completion Teams1
OR operator
||
Example: Command1 || Command2 - Command2 will only be executed if Command1 failed to execute.

Parentheses are used to group commands, examples:

  • (Command1 & Command2) && Command3 – If Command1 and Command2 are executed successfully, Command3 will be executed.
  • (Team1 & Team2) || Command3 - If Command1 and Command2 are not executed, Command3 will be executed.

Thank you for your attention! I'm waiting for criticism and suggestions...

UPD1
For those who are not in the know, circumflex (that “^” sign) means pressing the Ctrl key (^C = Ctrl +C).

^C - Interrupts the command, well, everyone knows that.
^S - Pauses the command and then runs it.
^I - Analogous to Tab, iterates through folders and files.
^M - Analogous to Enter.
^H - Analogous to Backspace.
^G - By writing the command echo ^G in a batch file, you can beep the system speaker (speaker).
(The commands ^I and ^H were obtained by me using the “scientific poke” method; there is also ^J but I don’t know what it does)

P.S. Other subtleties of the Windows command line have already been repeatedly covered on Habré. And I don’t see the point in copy-pasting.
P.P.S. Links to interesting posts and articles on other Windows command line features.

02/12/15 21.3K

Why is there such chaos in the world? Yes, because the administrator of our system forgot to fulfill his duties. Or I just lost the list of cmd commands from our world. Although this is a somewhat original look at the existing order of things, it nevertheless reflects part of the truth we need: using the command line, you can easily bring order to your computer:

What is the command line

The command line is the simplest tool for managing your computer's operating system. Control occurs using a number of reserved commands and character sets text keyboard without the mouse ( in the operating room Windows system ).

On UNIX-based systems, you can use the mouse when working with the command line.

Some commands came to us from MS-DOS. The command line is also called the console. It is used not only for administering the operating system, but also for managing regular programs. Most often, the most rarely used commands are included in this set of commands.

Advantage cmd applications basic commands is what it takes minimal amount system resources. And this is important in emergency situations when all the computer’s powers are, one way or another, involved.

In cmd the ability to execute and create integers is implemented batch files, representing a certain order of execution of a number of commands (scripts). Thanks to this, they can be used to automate certain tasks ( account management, data archiving and more).

Team Windows shell To manipulate and redirect commands to certain utilities and operating system tools, the Cmd.exe interpreter is used. It loads the console and redirects commands in a format that the system understands.

Working with the command line in the Windows operating system

You can call the console in Windows in several ways:

Both methods involve running the console as the current user. That is, with all the rights and restrictions that are imposed on its role in the operating system. To run cmd with administrator rights, you need to select the program icon in the Start menu and in context menu select the appropriate item:


After running the utility you can get background information about commands and the format for writing them in the console. To do this, enter the help statement and press “Enter”:

Basic commands for working with files and directories

The most frequently used commands are:

  • RENAME – renaming directories and files. Command syntax:

RENAME | REN [drive/path] original file/directory name | final filename
Example: RENAME C:UsershomeDesktoptost.txt test.txt

  • DEL (ERASE) – used to delete files only, not directories. Its syntax is:

DEL | ERASE [processing method] [filename]
Example: Del C:UsershomeDesktoptest.txt/P

By processing method we mean a special flag that allows you to implement a certain condition when deleting a file. In our example, the “P” flag enables the display of a permission dialog for deleting each file:


More details about the possible values ​​of the “processing method” parameter can be found in technical documentation on the Windows operating system.

MD [drive:] [path]
Example:
MD C:UsershomeDesktoptest1test2

The example will create a subfolder test2 within the test1 folder. If one of the path's root folders does not exist, it will be created too:

  • RD ( RMDIR) – deletion specific folder or all directories in the specified path. Syntax:

RD | RMDIR [process_key] [drive/path]
Example:
rmdir /s C:UsershomeDesktoptest1test2

The example uses the s flag, which will cause the entire branch of directories specified in the path to be deleted. Therefore, you should not use the rmdir command unnecessarily with this processing key.

In the next section, we'll take a closer look at network cmd commands.

Commands for working with the network

The command line allows you to manage not only the PC file system, but also its networking opportunities. Console network commands include a large number of operators to monitor and test the network. The most relevant of them are:

  • ping – the command is used to monitor capabilities network connection PC. Sent to the remote computer set quantity packets and then sent back to them. The transmission time of packets and the percentage of losses are taken into account. Syntax:

ping [-t] [-a] [-n counter] [-l size] [-f] [-i TTL] [-v type] [-r counter] [-s counter] [(-j host_list | - k node_list)] [-w interval] [target_PC_name]

Example command implementation:
ping example.microsoft.com
ping –w 10000 192.168.239.132

In the last example of the cmd ping command, the request is sent to the recipient with the specified IP address. The waiting interval between packets is 10,000 (10 seconds). By default this parameter is set to 4000:

  • tracert – used to determine the network path to a specified resource by sending a special echo message through the protocol
  • ICMP (Control Message Protocol). After running the command with parameters, a list of all routers through which the message passes is displayed. The first element in the list is the first router on the side of the requested resource.

Syntax of tracer cmd command:
tracert [-d] [-h maximum_hop_number] [-j node_list] [-w interval] [target_resource_name]
Example implementation:
tracert -d -h 10 microsoft.com

The example traces the route to a specified resource. This increases the speed of the operation due to the use of the d parameter, which prevents the command from attempting to obtain permission to read IP addresses. The number of transitions (jumps) is limited to 10 using set value parameter h. By default, the number of jumps is 30:

shutdown [(-l|-s|-r|-a)] [-f] [-m [\PC_name]] [-t xx] [-c “messages”] [-d[u][p]: xx:yy]
Example:
shutdown /s /t 60 /f /l /m \191.162.1.53

The remote PC (m) with the specified IP address (191.162.1.53) will shut down (s) after 60 seconds (t). This will force you to log out of all applications (f) and the current user's session (l).

Often inexperienced users perceived as something completely unnecessary and outdated. Thinking like this is a big mistake. The importance of the CMD console is difficult to overestimate even after it has lost most of its commands available in MSDOS. The advantage of the command line lies, first of all, in providing direct access k and her hidden possibilities In addition, the CMD console has several useful built-in utilities designed for working with software and hardware components of the computer.

It is not at all necessary to be a command line ace, however, there are commands that every self-respecting person should know Windows user. Here they are.

Assoc

Majority user files in operating systems are associated with certain programs, which handles them by default. This connection is called an association. To view it, there is just the assoc command. When executed, a list of extension and file type associations is displayed. The assoc command also allows .

For example, the command assoc .html = txtfile for HTML sets the file type to txtfile (text). If you need to find out which program opens files with this extension, use the ftype txtfile command.

Cipher

This command is intended for encrypting and decrypting data on disks with the NTFS file system, but with the same success it can be used to wipe free disk space. It's very easy to use. If you need to be guaranteed to remove the remains of all previously deleted files on drive D, run the command cipher /w:D in the console.

Driverquery

A useful command that allows you to view a list of all drivers installed in the operating system. When a command is executed without parameters, the data is output as a sorted list. The “Module” column contains driver names without extension, the “Name” column includes short description driver, “Driver Type” - accordingly the type, “Reference Date” indicates the date of installation or last modification of the driver.

FC (File Compare)

The FC command is useful mainly for coders; it can also be used by those users who have to work with text files. This command allows you to compare the contents of two files, looking for inconsistencies between them. Let's say you have two files file1.docx and file2.docx and you want to compare them. Execute in console next command:

fc /U “D:file1.docx” “D:file2.docx”

IN in this example we compared two simple ones text document. The command line interpreter found a discrepancy in one of the sentences and pointed to the specific location. The FC command also allows you to compare binary files, Unicode files, determine the number of inconsistencies, etc. If the compared files are identical, a corresponding message will be displayed when executing the FC command.

Ipconfig

A useful command that allows you to determine the current TCP/IP protocol settings or simply the IP address. However, it only shows the internal IP address, but if you are using a router and want to find out the IP with which you access global network, it is better to turn to the help of special online services like 2ip.ru.

Netstat

This command lists all current Internet connections. It is mainly used by administrators to display TCP and UDP connections, listening ports, routing tables and statistics for various protocols. It can also be used to search for traces left by viruses and other malicious objects. The Netstat command executed without parameters displays the connection type, local address, external address and current status.

Ping

Like Netstat, the ping command is mainly used system administrators. It serves for diagnostics computer networks. With its help, you can determine the availability of certain resources. Let's say you need to check the availability of Google. Because DNS Google server has the address 8.8.8.8, in the CMD console you need to execute ping command 8.8.8.8.

The digital IP address can also be replaced with a text URL - ping google.com. If the node is unavailable, the message “waiting limit exceeded” will be displayed, and the number of losses will be 100 percent.

Tracert

Another “network” command designed for network diagnostics (tracing). The command allows you to obtain a chain of nodes through which an IP packet addressed to the end node passes. Used by system administrators to identify a problem that is preventing packets from being delivered to an end node. An example of using the command is tracing to a Google node: tracert google.com.

Pathping

This command works in much the same way as tracert, but unlike the latter it is more functional. The command performs a trace plus sending queries to intermediate nodes on the route to collect information about delays and packet losses at each of them.

Powercfg

Powerful command line utility for managing settings Windows power supply. Executed only with parameters. The Powercfg command executed with the /Q switch displays the current configuration of the power supply scheme, with the /a switch it displays a report on the use of electricity in laptops, with the –energy switch it generates a detailed text log about the state of computer components, including rechargeable batteries. Also the Powercfg command can be used to create backup copies power settings and deploying them on new equipment.

Shutdown

This command is used to log off the user's session, shut down, restart, and hibernate the computer. Supports remote control. Shudown is always performed with parameters. For example, a command like shutdown /s /t 0 will shutdown open applications and immediately turn off the computer. You can view the list of available keys by running shutdown /? in the console.

Sfc (System File Checker)

One of the most useful and necessary commands. Designed to detect and restore damaged or modified system files Windows. Restoration is performed from backup copies created by the operating system itself. To run a system scan followed by file recovery, run sfc team with the /scannow parameter. After the scan is completed, you will need to restart your computer. You need to run this command in a console running as an administrator.

Tasklist

The Tasklist command does the same job as the Task Manager. Executed without parameters, it displays a list of all running processes running on a local or remote computer. At the same time, for each process its name, identifier (PID), session name, session number and allocated volume are displayed random access memory. The Tasklist command supports the use of keys and filters. For example, Tasklist /SVC displays a list of processes along with services for each process individually.

Taskkill

If Tasklist simply displays a list of running processes, then Taskkill terminates them in force mode. True, for this you will need to know the identifier of the process being terminated or the name executable file. Let's say you need to force close Notepad. First, run the Tasklist command and look Process PID notepad.exe. In our case, it has a value of 2580. Knowing the PID of the process, you can easily “kill” it. The command itself will look like this: Taskkill /PID 2580. The command Taskkill /IM notepad.exe will work in approximately the same way, only in this example all instances of the notepad.exe process will be terminated.

Bottom line

That's all for now. There are others useful commands CMD, which users would like to get acquainted with, but we will talk about them next time. These include Diskpart in particular - powerful tool disk and partition management capabilities that are not inferior to commercial ones software products type Acronis Disk Director.

Does it make sense to learn the command line professionally? Unlikely, unless you are planning to become a programmer or system administrator.

However, those wishing to master the CMD console would also do well to pay attention to its advanced analogue - the built-in PowerShell utility.

Need to download music from VK?

Using commands CMD Windows you can launch system utilities much faster than doing this in 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– and 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 things up - sometimes enter the right command 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;
  • necessity launch CMD as administrator (otherwise most commands cannot be launched);
  • 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 system disk, 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, click the same right button and select “Insert”. 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 quick paste box, the 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 the last few 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;
  • display 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. You can use it to check the contents 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. Content check 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. You can delete a non-empty folder 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.

Rice. 8. Cancel shutdown.

The commands work the same on any operating system. The only difference is in the inscriptions that appear. 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. It provides the maximum amount of information about the Windows system. 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 1400 to 2200 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. Checking active TCP connections.

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 system partition. And with the help additional parameters you can define a file system (/fs), set a 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 parameter /im 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.

The DIR command lists the files and subdirectories of a directory. When called without parameters, the dir command displays the volume label and serial number followed by a list of directories and files on the disk, including their names, date and time last change. And to view the directory tree, use the TREE command.

For files, dir also displays the name extension and size in bytes. The dir command also displays the total number of files and directories listed, their total size, and free space(in bytes) on disk.

DIR Command Syntax and Options

dir [drive:][path][filename] [...] attributes]]sort_order]] sort_field]] , where

  • [drive:][path]- Specifying the drive and directory whose files will be listed.
  • [file name]- Specifying a file or group of files about which you want to display information.
  • /p - Page output information, i.e. with a pause after filling the screen. To continue viewing, you must press any key.
  • /q- Display information about the owner of the file.
  • /w- Display information in multiple columns with up to five file or directory names on each line.
  • /d- Corresponds to /w, but sorted by columns.
  • /a [[:] attributes]- Displays the names of only those files and directories that have the specified attributes. If the /a option is not specified, the dir command displays the names of all files except system and hidden files. If /a is specified without attributes, the dir command displays the names of all files, including hidden and system files. Below is a list of values ​​that can be used when setting the attributes parameter. The colon (:) is optional. Values ​​from the table can be used in any combination without a space between them.
  • /t [[:]time_field] - Setting the time field for display and sorting. Below is a list of values ​​that can be used when setting the time_field parameter.
  • /s- Lists all occurrences of a particular file name in a specified directory and all its subdirectories.
  • /b- List each file name (including extension) or directory on a separate line. When you use the /b option, no header information or summary is displayed. The /b option overrides the /w option.
  • /l- Output an unsorted list of directory names and file names lowercase letters. The /l option prevents additional characters from being converted to lowercase.
  • /n- Displays a list in an expanded format with file names on the right side of the screen.
  • /x- Displays abbreviated file names NTFS systems and FAT. The format is the same as the /n option, but the abbreviated names are printed after the full names.
  • /? - Display command line help for the DIR command.

DIR Command Examples

  1. To display all directories in a row in alphabetical order, in multiple columns and pausing after each screen is filled, make sure the root directory is the current directory and enter the following command: dir /s/w/o/p
  2. The dir command displays the name root directory, the names of its subdirectories, and the names of files (including extensions) in that directory. It then displays the subdirectory names and file names in each directory of the directory tree.
  3. To modify the previous example so that the dir command does not print directory names, enter the following command: dir /s/w/o/p/a:-d
  4. To print a directory listing, enter the following command: dir > prn. If you specify the prn parameter, the directory listing is sent to the printer connected to the LPT1 port. If the printer is connected to a different port, you must replace the prn parameter with the name of that port.
  5. The output of the dir command can also be directed to a file by replacing prn with the filename. Additionally, you can also enter a path. For example, to direct the output of the dir command to the Dir.doc file in the Records directory, enter the following command: dir > \records\dir.doc. If the Dir.doc file does not exist, the dir command will create it, provided there is a Records directory.
  6. To list all files with a .txt extension in all directories on drive C, enter the following command: dir c:\*.txt /w/o/s/p.






2024 gtavrl.ru.