Help with BAT file commands and parameters. copy. Copy and replace utilities - copying and replacing files via the command line

A complete list of commands can be displayed by typing HELP at the command line.

CD Team

The current directory can be changed using the command

CD [drive:][path\]

The path to the required directory is specified taking into account the above comments. For example, the CD\ command moves to the root directory of the current drive. If you run the CD command without parameters, the names of the current drive and directory will be displayed.

COPY command

One of the most repetitive tasks when working on a computer is copying and moving files from one location to another. To copy one or more files, use the COPY command.

The syntax for this command is:

COPY source [+ source [+ ...]] [result]

A brief description of the parameters and keys of the COPY command is given in the table.

Table 1.1. COPY Command Options and Options

Parameter

Description

source

Name of the file or files being copied

The file is an ASCII text file, meaning the end of the file is indicated by an ASCII character of 26 ( +)

The file is binary. This switch specifies that the command interpreter should, when copying, read from the source the number of bytes specified by the size in the directory of the copied file

result

Directory to place the copy result and/or name of the file being created

Verifying the copy is correct by comparing files after copying

Disabling confirmation request to replace files

Enabling confirmation request to replace files

Here are examples of using the COPY command.

Copying the abc.txt file from the current directory to the D:\PROGRAM directory under the same name:

COPY abc.txt D:\PROGRAM

Copying the abc.txt file from the current directory to the D:\PROGRAM directory under the new name def.txt:

COPY abc.txt D:\PROGRAM\def.txt

Copying all files with the txt extension from drive A: to the "My Documents" directory on drive C:

COPY A:\*.txt "C:\My Documents"

If you do not specify a target file in the command, the COPY command will create a copy of the source file with the same name, creation date, and time as the source file, and place the new copy in the current directory on the current drive. For example, in order to copy all the files from the root directory of drive A: to the current directory, just run the following short command:

COPY A:\*.*

When copying, you can specify the names of not only files, but also computer devices as a source or result. For example, in order to print the file abc.txt on a printer, you can use the command to copy this file to the PRN device: COPY abc.txt PRN

Another interesting example: let's create a new text file and write information into it, without using a text editor. To do this, just enter the command COPY CON my.txt, which will copy what you type on the keyboard into the file my.txt (if this file existed, it will be overwritten, otherwise it will be created). To complete the input, you must enter the end-of-file symbol, that is, press the keys +.

The COPY command can also merge (glue) multiple files into one. To do this, you need to specify a single resulting file and several source ones. This is achieved by using wildcards (? and *) or the format file1 + file2 + file3. For example, to merge files 1.txt and 2.txt into file 3.txt, you could issue the following command:

COPY 1.txt+2.txt 3.txt

Combining all files with the dat extension from the current directory into one file all.dat can be done like this:

COPY /B *.dat all.dat

The /B switch is used here to prevent truncating the files being joined, since when combining files, the COPY command by default considers text files.

If the name of the target file is the same as the name of one of the copied files (except the first one), then the original contents of the target file are lost. If the target file name is omitted, the first file in the list is used as its name. For example, the COPY 1.txt+2.txt command will append the contents of file 1.txt to the contents of file 2.txt. The COPY command can also be used to assign the current date and time to a file without modifying its contents. To do this you need to enter a command like

COPY /B 1.txt +,

Here, commas indicate the omission of the receiver parameter, which leads to the desired result.

The COPY command also has its drawbacks. For example, it cannot be used to copy hidden and system files, zero-length files, or files from subdirectories. In addition, if, when copying a group of files, COPY encounters a file that cannot currently be copied (for example, it is occupied by another application), the copying process will be completely interrupted and the remaining files will not be copied.

XCOPY command

The problems mentioned in the description of the COPY command can be solved using the XCOPY command, which provides much more options when copying. It should be noted, however, that XCOPY can only work with files and directories, but not with devices.

The syntax for this command is:

XCOPY source [result] [keys]

The XCOPY command has many options, we will only touch on a few of them. The /D[:[date]] key allows you to copy only files modified on or after the specified date. If the date parameter is not specified, then copying will be performed only if the source is newer than the result. For example, the command

XCOPY "C:\My Documents\*.*" "D:\BACKUP\My Documents" /D

will copy to the "D:\BACKUP\My Documents" directory only those files from the "C:\My Documents" directory that have been changed since the last such copying or that were not in "D:\BACKUP\My Documents" at all.

The /S switch allows you to copy all non-empty subdirectories in the source directory. Using the /E switch, you can copy all subdirectories, including empty ones.

If the /C switch is specified, copying will continue even if errors occur. This can be very useful for copy operations performed on groups of files, such as when backing up data.

The /I switch is important when multiple files are copied and the destination file is missing. When this switch is specified, the XCOPY command assumes that the destination file must be a directory. For example, if you specify the /I switch in the command to copy all files with the txt extension from the current directory to the TEXT subdirectory that does not yet exist,

XCOPY *.txt TEXT /I

then the TEXT subdirectory will be created without additional requests.

The /Q, /F and /L keys are responsible for the display mode when copying. When you specify the /Q key, file names are not displayed when copying, and the /F key - the full paths of the source and result are displayed. The /L switch means that only files that need to be copied are displayed (the copying itself is not performed).

Using the /H switch, you can copy hidden and system files, and using the /R switch, you can replace files with the Read-Only attribute. For example, to copy all files from the root directory of the C: drive (including system and hidden ones) to the SYS directory on the D: drive, you need to enter the following command:

XCOPY C:\*.* D:\SYS /H

The /T switch allows XCOPY to copy only the source directory structure, without duplicating the files in those directories, and empty directories and subdirectories are not included. In order to still include empty directories and subdirectories, you need to use the /T /E key combination.

Using XCOPY, you can only update existing files when copying (new files are not written). To do this, use the /U key. For example, if the C:\2 directory contained the files a.txt and b.txt, and the C:\1 directory contained the files a.txt, b.txt, c.txt and d.txt, then after executing the command

XCOPY C:\1 C:\2 /U

in the C:\2 directory there will still be only two files a.txt and b.txt, the contents of which will be replaced by the contents of the corresponding files from the C:\1 directory. If a file with the Read-Only attribute was copied using XCOPY, then By default, this attribute will be removed from the copy file. In order to copy not only data, but also the entire attributes of a file, you must use the /K key.

The /Y and /-Y switches determine whether confirmation should be requested before replacing files when copying. /Y means that such a request is needed, /-Y means it is not needed.

DIR Team

Another very useful command is DIR [drive:][path][filename] [keys], which is used to display information about the contents of drives and directories. The [drive:][path] parameter specifies the drive and directory whose contents should be displayed. The [filename] parameter specifies the file or group of files to be included in the list. For example, the command

DIR C:\*.bat

will display all files with the bat extension in the root directory of the C: drive. If you specify this command without parameters, the disk label and serial number, the names (in short and long versions) of files and subdirectories located in the current directory, as well as the date and time of their last modification are displayed. It then displays the number of files in the directory, the total size (in bytes) occupied by the files, and the amount of free disk space. For example:

The volume in device C is labeled PHYS1_PART2 Volume Serial Number: 366D-6107 Contents of the C:\aditor folder.<ПАПКА> 25.01.00 17:15 . .. <ПАПКА>01/25/00 17:15 .. TEMPLT02 DAT 227 08/07/98 1:00 templt02.dat UNINST1 000 1 093 03/02/99 8:36 UNINST1.000 HILITE DAT 1 082 09/18/98 18:55 hilite.dat LT01 DAT 48 07.08 .98 1:00 templt01.dat UNINST0 000 40 960 04/15/98 2:08 UNINST0.000 TTABLE DAT 357 08/07/98 1:00 ttable.dat ADITOR EXE 461 312 12/01/99 23:13 aditor.exe README TXT 3 9 74 01/25/00 17:26 readme.txt ADITOR HLP 24 594 10/08/98 23:12 aditor.hlp TEXT~1 TXT 0 03/11/01 9:02 Text file.txt 11 files 533 647 bytes 2 folders 143 261 696 bytes free

You can use the DIR command switches to specify different layout, filtering, and sorting modes. For example, when using the /W switch, the list of files is displayed in wide format with the maximum possible number of file or directory names on each line. For example:

The volume in device C is labeled PHYS1_PART2 Volume Serial Number: 366D-6107 Contents of folder C:\aditor [.] [..] TEMPLT02.DAT UNINST1.000 HILITE.DAT TEMPLT01.DAT UNINST0.000 TTABLE.DAT ADITOR.EXE README. TXT ADITOR.HLP TEXT~1.TXT 11 files 533,647 bytes 2 folders 143,257,600 bytes free

Using the /A[[:]attributes] key, you can display the names of only those directories and files that have the specified attributes (R - “Read Only”, A - “Archive”, S - “System”, H - “Hidden”, the prefix "–" has the meaning NOT). If the /A switch is used with more than one attribute value, only those file names will be displayed whose attributes all match the specified ones. For example, to display the names of all files in the root directory of the C: drive, which are both hidden and system, you can use the command

DIR C:\ /A:HS

and to display all files except hidden ones - the command

DIR C:\ /A:-H

Note here that the directory attribute corresponds to the letter D, that is, in order, for example, to display a list of all directories on the C: drive, you need to specify the command

DIR C:/A:D

The /O[[:]sorting] switch specifies the order in which the directory contents are sorted when output by the DIR command. If this switch is omitted, DIR prints the names of files and directories in the order in which they are contained in the directory. If the /O switch is specified and the sort option is not specified, then DIR displays names in alphabetical order. In the sorting parameter you can use the following values: N - by name (alphabetical), S - by size (starting with the smallest), E - by extension (alphabetical), D - by date (starting with the oldest), A - by download date (starting with the oldest ones), G - start the list with directories. The prefix "–" means reverse order. If you specify more than one sort order value, files are sorted by the first criterion, then by the second, and so on.

The /S switch means displaying a list of files from a given directory and its subdirectories.

The /B switch lists only directory names and file names (in long format), one per line, including extension. In this case, only basic information is displayed, without final information. For example:

Templt02.dat UNINST1.000 hilite.dat templt01.dat UNINST0.000 ttable.dat aditor.exe readme.txt aditor.hlp Text file.txt

MKDIR and RMDIR commands

To create a new directory and delete an existing empty directory, use the commands MKDIR [drive:]path and RMDIR [drive:]path [keys] respectively (or their short equivalents MD and RD). For example:

MKDIR "C:\Examples" RMDIR "C:\Examples"

The MKDIR command cannot be executed if a directory or file with the given name already exists. The RMDIR command will fail if the directory being deleted is not empty.

DEL command

You can delete one or more files using the command

DEL [drive:][path]filename [keys]

Are wildcards used to delete multiple files at once? And *. The /S key allows you to delete specified files from all subdirectories, the /F key allows you to forcefully delete read-only files, the /A[[:]attributes] key allows you to select files for deletion by attributes (similar to the /A[[:]attributes key ] in the DIR command).

REN Team

You can rename files and directories using the RENAME (REN) command. The syntax of this command is as follows:

REN [drive:][path][directory1|file1] [directory2|file2]

Here directory1|file1 specifies the directory/file name to be changed, and directory2|file2 specifies the new directory/file name. Can wildcards be used in any parameter of the REN command? And *. In this case, the symbols represented by the templates in the file2 parameter will be identical to the corresponding symbols in the file1 parameter. For example, to change the extension to doc for all files with a txt extension in the current directory, you need to enter the following command:

REN *.txt *.doc

If a file named file2 already exists, the REN command will stop executing and display a message indicating that the file already exists or is in use. Additionally, the REN command cannot specify a different drive or directory to create the resulting directory and file. For this purpose, you need to use the MOVE command, designed to rename and move files and directories.

MOVE command

The command syntax for moving one or more files is:

MOVE [drive:][path]file_name1[,...] resulting_file

The command syntax for renaming a folder is:

MOVE [drive:][path]directory1 directory2

Here, the resulting_file parameter specifies the new location of the file and can include a drive name, a colon, a directory name, or a combination of these. If only one file is being moved, you can specify a new file name. This allows you to immediately move and rename the file. For example,

MOVE "C:\My Documents\list.txt" D:\list.txt

If the /-Y switch is specified, a confirmation request will be issued when creating directories and replacing files. The /Y switch cancels issuing such a request.


The XCopy utility is one of the oldest and most useful data transfer tools. The purpose of XCopy is to change the location of folders. Explorer has largely replaced this utility, and we recommend using it whenever possible. However, there are several important uses of the XCopy utility:

  • scripts for file manipulation;
  • moving individual files in a complex structure;
  • copying all available files, even if some files cannot be moved;
  • archiving data from one system to another;
  • moving files with specific attributes.

Many people use XCopy as their archiving application because it does a great job. You can easily copy data files from a folder to backup media, such as another hard drive, floppy disk, Zip drive, or network drive. Unfortunately, XCopy does not support traditional media such as magnetic tape. In addition, the media you are copying to must be partitioned, so XCopy does not allow you to burn files to CDs.

How to use?

The XCopy utility is used in the same way as the standard copy command - specifying the source and target files. For example, to copy all files from the MyDir folder on drive C to the same folder on drive D, enter the command:

XCopy C:\MyDir\*.* D:\MyDir\*.*

Then press the Enter key. The XCopy utility supports a set of keys, the most important of which are listed below.

Additional keys

/A and /M- only archive files are copied. With these keys, the XCopy utility can be used for archiving. The /M switch also resets the archive attribute on copied files, indicating that they have been backed up. Therefore, when using XCopy as an archiving application, you should only use the /M switch.

/C- continues copying even if data errors occur. Use this feature to copy all possible contents from the damaged folder to a new location. Explorer does not have this function - copying stops after the first error.

/G- allows you to copy encrypted files to a location that does not support encryption. This function decrypts the file and you must have the appropriate system rights to run it.

/H- copies hidden and system files.

/K- copies file attributes along with the files themselves. In normal mode, the XCopy utility strips files of the read-only attribute.

/O and /X- protection of copied files. The /O key, along with the file, copies information about its owner and the access control table. The access control table contains information about the users who have access rights to the file and the actions they can perform with it. The /X switch also copies the file's audit information. This feature is important when monitoring file access.

/R- overwrites files with a read-only attribute when copying. Use this key when archiving to ensure that write-protected file versions are updated in the backup.

/S and /E- copy files not only from the current folder, but also from all its subfolders. The /E switch also copies empty subfolders. The specified keys allow you not only to copy files, but also to preserve the folder structure.

/T- creates a copy of the original folder structure without copying any files. Use this feature to create new projects. Sometimes it is useful to just repeat the folder structure without copying specific information from it.

/U- copies from the source folder only those files that are present in the target folder. This feature helps update a portion of the files in the target folder, eliminating the need to specify each file individually.

/V- checks all copied files, comparing their contents with the original files. This switch increases the copying time, but it should always be used when archiving using the XCopy utility. Otherwise, there is a risk of backing up damaged data and not knowing about it.

HDDRawCopy- a free program for creating and restoring images of hard drives and other storage media. This program is also useful for some Android devices. It allows you to make a complete image of the phone’s flash memory and restore it at any time. Also designed to restore the phone in case of a system crash, or even restore " bricks" in most cases. The program uses bit-by-bit copying, which makes it possible to recreate an exact copy of the system. It takes about 20 minutes to copy 4GB of our smartphone.

The site administration is not responsible for what you do with your phone. Before you do anything, think about why you need it and carefully study the instructions.

DFU Mode - Firmware mode (internal flash memory including service areas) of the phone using the manufacturer's utilities or the QPST utility. Allows you to reflash your phone with any firmware, restore it from brick mode, change IMEI, etc. low-level actions with phone software.

Creating an image via HDDRawCopy

2. Restart your computer.

3. Turn off the phone.

5. Connect to computer.

6. Refuse to format the flash drive. (A sign that the computer saw the phone in DFU mode)

7. Release the phone buttons.

8. Run HDDRawCopy1.02Portable.exe as administrator, click Agree.

9. Select the Qualcomm MMC Storage device and click Continue.

10. Double-click FILE and indicate where to save our image.

11. Click Continue.

12. Click Start and wait for the image creation process to complete .imgc.

13. Close the program.

14. Remove and insert the battery.

15. Turn on the phone.

Creating a clean image "like from a store" using HDDRawCopy

If you already have some important data on your phone, then make a backup first. Otherwise all data will be lost!

1. Go to settings, select " Recovery and reset"and we do" Copying data".

2. Go to settings, select "Memory" and " Clear phone memory" (Internal, not SD card!)

4. Restart your computer.

5. Download HDDRawCopy1.02Portable.exe.

Download HDDRawCopy1.02Portable.exe 3602

6. Remove the back cover of the phone.

7. Go to settings, select " Recovery and reset" and do " Reset settings ". There is no need to clear the SD card!

8. The phone will reboot into mode Recovery, and the system will automatically begin cleaning. When the message appears reboot, the phone will turn off with vibration. At this point, remove the battery to prevent the system from restarting.

We got the phone" like from a store".

9. Insert the battery.

10. Make a full backup according to the instructions " Creating an image via HDDRawCopy"

Firmware using HDDRawCopy

2. Restart your computer.

3. Turn off the phone.

4. Press and hold the Volume + and Volume - buttons

Apple companies. Sales are breaking all records, which means that millions of users will soon face the difficulties of switching from Android to iOS. Moreover, the screens of the new iPhones have increased to 4.7″ and 5.5″, and more customization options have been added to the operating system. To make this process painless, and to ensure that all information remains safe and sound, Lifehacker has prepared instructions for you in six simple steps.

Add email accounts

If you used different email addresses on Android, simply add them all to your iPhone. Next, in the settings of each of them, select contacts, calendars, notes and mail for synchronization.

If you have saved contacts and calendars in the memory of your Android smartphone, install one of the special applications that will help you transfer all the information without loss. Many of them provide transfers via Wi-Fi, so you don’t have to connect your smartphones to your computer.

For example, use the program Copy My Data. It can be downloaded for free for both platforms and can easily transfer all the necessary data. Just install the app on both smartphones and follow the instructions.

Log in to social networks

If your contacts and calendars were linked to Facebook or Twitter, install the corresponding applications on your iPhone. Next, go to settings and link to the social network you need.




After this, you will have the opportunity to synchronize the necessary information by switching the sliders "Calendars" And "Contacts".

Use specialized applications

The easiest way to transfer all your photos and videos from your smartphone to your smartphone is to use one of the dedicated apps. Similar to contacts, you just need to install one of these programs on both of your devices and, following the prompts, synchronize your gadgets via Wi-Fi.

Sync with iTunes

You can also move your photos from Android to iOS using iTunes. To do this, just follow the following sequence of actions:

  1. Connect your Android smartphone to your computer and find photos and videos there. They are often located in the folder DCIM → Camera. If you have a Mac computer, install the free Android File Transfer application and follow a similar path inside the program.
  2. Copy photos from your smartphone memory to a separate folder on your computer.
  3. Connect your iPhone to your computer.
  4. Open iTunes and go to your iPhone's page.
  5. Go to the tab "Photo", check the box next to "Sync photos from:" and select the folder containing the copied photos. If you also want to move the video, check the box "Enable video synchronization".
  6. Click Apply in the lower right corner of the window.

Uploaded photos can be found in the section "Albums" applications "Photo".

Use streaming services

If you used on Android, just install them on your iPhone. This could be Spotify, Rdio, Yandex.Music or the less popular Pandora and Beats Music. Enter your account details and continue listening to music.

Import from computer

The instructions are the same as when syncing photos using iTunes.

  1. Find in the folder Music your smartphone or in a similar section of the application Android File Transfer, if you have a Mac, music.
  2. Select the tracks you need and copy them to a separate folder on your computer.
  3. Open iTunes and in the main window select the tab "Music".
  4. Move tracks from the selected folder to your open music library.
  5. Go to your iPhone page and in the “Music” section, select either the entire library of songs, or some individual ones, a specific artist, or album.
  6. Click "Sync" and the music will appear on your iPhone.

Import ePub files using iTunes

The instructions are similar to the previous two cases:

  1. Find books and PDFs in the Documents section of your smartphone. Mac owners should look for a similar folder inside the application Android File Transfer.
  2. Copy the files you need to a separate folder.
  3. Drag books and PDFs into a section iBooks → Lists or iTunes → “Books” in case of using Windows.
  4. Open iTunes, select the books you need and sync.

You will find PDF files in the section of the same name in the iBooks application on your smartphone.

Use third party apps

If you've ever downloaded books using your Kindle, Google Play Books, or Nook, simply download the corresponding apps on your iPhone. After that, enter your username and password and enjoy reading.

Import into iWork office suite using iCloud

First of all, you need to install a set of applications iWork. Owners of gadgets purchased after September 2013 can download all three of these applications for free. The rest will have to pay 329 rubles for each of them.

  1. If during the process of setting up your new iPhone you forgot to turn on iCloud synchronization, follow this sequence of actions.
    Go to menu "Settings" → iCloud. By selecting "Account" Sign in using your Apple ID. If you don't have one, just create a new one.
  2. Return to menu " Settings", find the desired application there and switch the slider "Use iCloud".

Exactly as in the previous examples, move the documents from the section Documents(Android File Transfer → Documents) to a separate folder on your computer.




To upload documents to iCloud, sign in to iCloud.com using your Apple ID and password. Then select one of the applications depending on the type of your document. Just drag the desired file inside the program, and it will be uploaded to cloud storage and appear on all devices linked to this Apple ID.

The App Store boasts more than 900,000 apps, which is a quarter more than Google Play, and the practice of launching high-profile projects first on iOS is normal. Whatever you use on Android, you will probably find a replacement or the same application on iOS.

Hi all. In this article, we will talk about topics such as:

Command line (CMD) is a separate program that allows the user to directly interact with the operating system. Command line is based on an environment in which applications and utilities are executed using a text-based interface, and the execution result is displayed on the screen.

Command line Windows uses a command interpreter cmd.exe, which allows you to download applications and directs the flow of data between them, in other words, translates user commands into a form understandable to the system. Command line console integrated into all versions of Windows OS. At first sight command interface scares the user who is spoiled by the graphical interface of the same Windows, but as a rule command interface, is much faster and has a lot of additional features that cannot be implemented in a graphical interface.

Launch methods:

  1. Start / All Programs / Accessories / Command Prompt.
  2. Start / Run / enter cmd.exe in the line
  3. Run from the system folder: C:\WINDOWS\system32\cmd.exe

CMD commands.

Below I will give you a sign with a complete list command line commands, and after the tablet we will look in more detail at the main CMD commands.

Team Description
ASSOC Display or change associations based on file name extensions.
AT Execute commands and launch programs according to a schedule.
ATTRIB Display and change file attributes.
BREAK Enable/disable the CTRL+C key combination processing mode.
CACLS Display/edit access control lists (ACLs) for files.
CALL Calling one batch file from another.
CD
CHCP Display or set the active code page.
CHDIR Display the name or change the current folder.
CHKDSK Checking the disk and displaying statistics.
CHKNTFS Show or change whether disk check is performed during boot.
CLS Cleaning the screen.
CMD Launching another Windows command line interpreter.
COLOR Set the default text and background color.
COMP Comparing the contents of two files or two sets of files.
COMPACT Display/change file compression on NTFS partitions.
CONVERT Convert FAT disk volumes to NTFS. The currently active drive cannot be converted.
COPY Copy one or more files to another location.
DATE Display or set the current date.
DEL
DIR List files and subfolders from a specified folder.
DISKCOMP Comparing the contents of two floppy disks.
DISKCOPY Copying the contents of one floppy disk to another.
DOSKEY Editing and re-calling command lines; creating macros.
ECHO Display messages and switch the display mode of commands on the screen.
ENDLOCAL End of local environment changes for batch file.
ERASE Deleting one or more files.
EXIT Exiting the CMD.EXE (command line interpreter) program.
F.C. Compare two files or two sets of files and display the differences between them.
FIND Search for a text string in one or more files.
FINDSTR Searching for strings in files.
FOR Run the specified command for each of the files in the set.
FORMAT Formatting a disk for use with Windows.
FTYPE Display or change the file types used when matching by file name extension.
GOTO Transfer control to the marked line of the batch file.
GRAFTABL Allows Windows to display extended characters in graphics mode.
HELP Displays help information about Windows commands.
IF An operator for conditionally executing commands in a batch file.
LABEL Create, change and delete volume labels for disks.
M.D. Creating a folder.
MKDIR Creating a folder.
MODE Configuring system devices.
MORE Sequential output of data in parts the size of one screen.
MOVE Move one or more files from one folder to another.
PATH Display or set the search path for executable files.
PAUSE Pauses the execution of a batch file and displays a message.
POPD Restores the previous value of the current active folder saved using the PUSHD command.
PRINT Printing the contents of text files.
PROMPT Changing the prompt in the Windows command line.
PUSHD Saves the current active folder and moves to another folder.
R.D. Deleting a folder.
RECOVER Recovering readable information from a bad or damaged disk.
R.E.M. Place comments in batch files and CONFIG.SYS file.
REN
RENAME Renaming files and folders.
REPLACE File replacement.
RMDIR Deleting a folder.
SET Listing, setting and removing Windows environment variables.
SETLOCAL Start local environment changes for the batch file.
SHIFT Changing the contents (shift) of substituted parameters for a batch file.
SORT Sorting input.
START Run a program or command in a separate window.
SUBST Matches the given path to a drive name.
TIME Displaying and setting the system time.
TITLE Sets the window title for the current session of the CMD.EXE command line interpreter.
TREE Graphic display of the folder structure of a specified drive or specified folder.
TYPE Displaying the contents of text files.
VER Displays information about the Windows version.
VERIFY Setting the mode for checking the correctness of writing files to disk.
VOL Displays the volume label and serial number for the disk.
XCOPY Copying files and folder trees.

Command line commands.

Now let’s talk in more detail about the most frequently used commands, but first I’ll tell you a little about the keys that can be used together with commands for a more functional action. For example, let's take the RD command (remove directory), if it is applied to an empty folder, then it will be deleted, but if there are files in the folder, then nothing will happen. So, to delete a folder along with the files in it, you need to use the key together with the RD command /s.

That is, for example, there is a directory kat and to find any files in it, in order to delete the directory along with the files, you need to register RD/s cat. A list of keys to any command can be found by typing the command name followed by a slash and the question: command_name/?.

Basic commands for working with directories:

  • MD - Directory creation. Syntax: (MD directory name, it is possible to specify the location path).
  • RD - Removing a directory. Syntax: (RD directory name, it is possible to specify the location path). Note, RD without keys only allows you to delete an empty directory.
  • CD - Change the current directory. Syntax: (CD directory name, it is possible to specify the location path). CD\ - Go to the root directory. CD.. - Go to the parent directory.
  • DIR - View directory as a list. Syntax: (DIR directory name, it is possible to specify the location path).
  • TREE - Display directories in graphical representation. Syntax: (TREE directory name, it is possible to specify the location path).
  • MOVE - Move\Rename directory. Syntax: .
  • XCOPY - Copy directory structures. Syntax: (XCOPY what_we copy where_we copy, it is possible to specify the location path).

Commands for working with files:

  • COPY CON - Create a file. Syntax: (COPY CON file_name_with_extension, it is possible to specify the location path).
  • TYPE — Displays the contents of the file on the screen. Syntax: (TYPE file_name_with_extension, it is possible to specify the location path).
  • DEL - Delete a file. Syntax: (DEL file_name_with_extension, it is possible to specify the location path).
  • COPY - Copying a file\Combining files. Syntax(copy): (COPY what_we copy where_we copy, it is possible to specify the location path). Syntax(merging): (COPY file_name + file_name + file_name... merge_file_name, it is possible to specify the location path).
  • EDIT - Create\Edit a file. Syntax: (EDIT file name, it is possible to specify the location path).
  • MOVE - Move\Rename a file. Syntax: (MOVE what_we move where_we move, it is possible to specify the location path).
  • REN - Rename files. Syntax: (REN what_we rename what_we rename, it is possible to specify the location path).
  • FC - File comparison. (FC file_name file_name file_name..., it is possible to specify the location path).

System commands:

  • CLS - Screen cleaning.
  • DATE - View and display changes to the current date.
  • VER — Displays information about the current version of the Operating System.
  • VOL — Displays information about the volume-logical partition of the disk.
  • SYSTEMINFO - Displays information about system configurations.
  • EXIT - Exits the command line.

These were the most used command line commands.

This is where I end this article, I hope you have fully understood the topics: CMD Commands, Command Line Commands, Command Line.