We create a file with the extension bat windows 7. How to open a .BAT file? Using bat files when backing up data

A BAT file is a program code saved with the extension .bat or .CMD as you like.

The possibilities of bat files are almost limitless, but as a rule, programmers use these extensions in simple and routine matters.

Using a bat file, you can open files on your computer, copy, move and delete files with or without a mask, run scripts from third-party programs, and open a browser with the desired url. I often use such files to open ftp folders on a remote server.

How to create a bat file

Creating baht files couldn't be easier. Open a regular text editor and save it with the .bat extension.

You can also use the advanced program “notepad++”

Here is a sample code to write a bat file:

explorer.exe "C:\Program Files"

This code will open the “program files” folder on the C:\ drive

Writing .bat files requires special care from the computer user. Since batch files can delete entire directories, format a computer partition

Here is a code example - formatting the F:\ partition

@echo off
format F /q /autotest

Example bat code - Create 100 folders:

@echo off
for /l %%i in (1,1,100) do mkdir "dir %%i"

You can make a bat and (Virus) a harmful program script: For example, the code below will delete important exe files.

@echo off
do del "c:\windows\exploer.exe"
do del "c:\windows\mspoint.exe"
do del "c:\windows\notepad.exe"

Command to create a folder with a bat file

The code below will create 3 folders in the location where the file itself is located. Also, the first folder created will contain another subfolder. Since the folder names are written in Cyrillic, we add the encoding line chcp 1251. Such a file cannot be written with a regular notepad, since it is not possible to change the encoding of Russian letters. Use notepad++.

chcp 1251
MD .\folder_article\base\
MD .\directory\
MD .\repository\

Download Bat file

- the file creates 3 folders

Example bat code how to open a folder

explorer.exe "C:\Users\Administrator\Desktop\photo\"

How to open bat format?

Just like creating .bat files in a text editor, they can be opened with the same notepad, wordpad, or notepad++.

The only thing to remember when opening a bat file is that when you double-click on the file, it will launch the program. That is, to open it for editing, move the cursor over the file being edited and right-click to open the context menu where select open with notepad++

Also, if you click on just open in the context menu, you will also start executing the bat file.

There is another way: Open the text editor Notepad and drag your edited file into it.

Important: Users often confuse the concepts of files with the .bat extension and the “The Bat” mail client for sending and receiving mail documents.

Basic Bat File Operators

@ All commands executed by bat are displayed on the screen, to remove unnecessary things, a “dog” is placed in front of the command. Often used with @echo off.
set Sets variables. For example, setper=c:\windows here per assigns the path. You can write a cumbersome value to a variable and specify it in the script, which makes the code more compact. If its content changes, then you will not have to change the values ​​everywhere where this variable is provided.
:: One of two methods for commenting in a bat file without displaying this line on the screen.
:LABEL When you add a colon to a word, a label is created that allows you to jump to different sections of the body file. A label can have a different name, LABEL is an example.
CALL Bat is a command that calls one batch file within another. All parameters described in one of the files can be passed to each other.
CHOICE Select command.
CLS Clears the contents of the shell that is displayed above the CLS.
ECHO Displays a message on the screen. For example, “ECHO How are you!” will display “How are you!” If you don't use @ECHO off at the beginning of the batch file, then you will see the path to the bat file and two messages, which is unnecessary. You can create an empty line by typing ECHO. with a period at the end.
EXIT Ends the current batch script.
GOTO LABEL Used to jump to a specific label, in this case LABEL, and execute the script after it.
IF As in the bat programming languages, the if command represents the fulfillment of a condition, depending on which the script will go along one path or another. Please refer to the help for the syntax.
for A loop used to organize the execution of the same actions.
PAUSE If you need to see the output of a script and it runs and the window closes quickly, then use PAUSE. It will allow you to view the result and complete the script by pressing any button.
R.E.M. Second way to comment. Unlike:: is printed on the screen if there is no @ECHO off construct.
SHIFT Changes the position of batch parameters in the bat file.
START Launches programs, windows, etc. Has many attributes.

For a more detailed description of the bat file code, read the Windows Help

In this article, we will look at two ways to create a bat file: using Explorer and using Notepad. This will be enough to create new bat files, but first let’s decide what they are for. To put it simply, the bat file is needed to write down a set of commands once Windows command line, and then execute them at any time without typing each time. In general, an ideal option for lazy and/or system administrators. =)

I'll get straight to the point:

Method one. We create bat file V " Conductor»

Let me make a reservation right away that this method requires that there be Enabled display of file extensions in Explorer. This is convenient in many cases and I don't understand why this feature is disabled by default in Windows.

We change its extension(what is after the last dot) on .bat:

After we press Enter, Windows will ask “After changing the extension, this file may no longer be accessible. Make the change?" Well, of course “Yes”! This is exactly what we are trying to achieve: change the .txt extension to .bat:

Voila! We received a “batch file”, i.e. an executable file in which you can enter commands that will be executed when it starts:

Method two. We create bat file V " Notepad»

To create a bat file using " Notepad", need to open Notepad(or any text file in Notepad) and use the menu " File", option "":

A file saving window will open. It is important to take into account 2 things:

  1. « File type» must be displayed on All files (*.*)
  2. « File name" must have the extension .bat

We look where we save (to find it later) and press the button “ Save»:

Total:

Any of these methods makes sense if you have administrator rights. But the first one requires additional settings (which I still recommend changing and applying).

Windows bat files are a convenient way to perform various tasks on a PC, which is actively used by computer experts. They allow you to automate everyday tasks, reduce their completion time, and turn a complex process into something feasible for the average user. This article presents the basic capabilities of batch files and recommendations for writing them yourself.

Automation made easy

How to create a bat file? To do this you need to do the following:

  1. In any text editor, for example, Notepad or WordPad, create a text document.
  2. Write your commands in it, starting with @echo , and then (each time on a new line) title [name of the batch script], echo [message that will be displayed on the screen] and pause.
  3. Save the text in an electronic document with the .bat extension (for example, test.bat).
  4. To run, double-click on the newly created batch file.
  5. To edit it, you need to right-click on it and select “Edit” from the context menu.

The raw file will look something like this:

title This is your first bat file script!

echo Welcome to the batch processing script!

We will discuss bat file commands and their use in more detail below.

Step 1: Create a software script

Let's assume that a user often has problems with the Network. He constantly uses the command line, typing ipconfig and pinging Google to troubleshoot network problems. After a while, the user realizes that it would be much more effective if he wrote a simple bat file, wrote it to his USB drive and ran it on the computers he diagnoses.

Creating a new text document

A batch file makes it easy to perform repetitive tasks on your computer using the Windows Command Prompt. Below is an example of a script responsible for displaying some text on the screen. Before creating a bat file, you should right-click on an empty space in the directory and select “Create”, and then “Text Document”.

Adding code

Double-clicking this new text document will open your default text editor. You can copy and paste the example code above into a text entry.

Preservation

The above script displays the text “Welcome to the Batch Processing Script!” on the screen. The electronic document must be written by selecting the text editor menu item “File”, “Save As”, and then specify the desired name of the bat file. It should be completed with a .bat extension (for example, welcome.bat) and click OK. To display the Cyrillic alphabet correctly, in some cases you should make sure that the encoding is selected correctly. For example, when using the console of a Russified Windows NT system, the document must be saved in CP866. Now you should double click on the bat file shortcut to activate it.

But the following message will appear on the screen:

"Welcome to the batch script! Press any key to continue..."

If the bat file does not start, users recommend going to the registry and deleting the key:

"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.BAT\UserChoice."

Don't think that's all that batch scripts can do. Script parameters are modified versions of command line commands, so the user is limited only by their capabilities. And they are quite extensive.

Step 2: Get to Know Some Commands

If a PC user is familiar with how to execute DOS console commands, then he will be a master at creating software scripts because they are the same language. The lines in the bat files will tell the cmd.exe interpreter everything that is required of it. This saves time and effort. In addition, it is possible to specify some logic (for example, simple loops, conditionals, etc., which are conceptually similar to procedural programming).

Built-in Commands

1. @echo is a bat file command that will allow you to see the script running on the command line. It is used to view the progress of production code. If the batch file has any problems, this command will quickly isolate the problems. Adding off makes it possible to quickly terminate code execution, avoiding unnecessary information being displayed on the screen.

2. Title provides the same functionality as a tag in HTML, i.e. creates a header for the batch script in the command line window.</p><p>3. Call calls one bat file from another or a subroutine within one script. For example, the power function calculates the power %2 of %1:</p><p>if %counter% gtr 1 (</p><p>set /a counter-=1</p><p>endlocal & set result=%prod%</p><p><img src='https://i2.wp.com/syl.ru/misc/i/ai/324915/1862019.jpg' width="100%" loading=lazy loading=lazy></p><p>4. Cls clears the command line. Used to ensure that previous output of extraneous code does not interfere with viewing the progress of the current script.</p><p>5. Color sets the font and background color. For example, the command color f9 specifies white letters on a blue background. A command without a parameter restores default settings.</p><p>6. Echo is used to display information, as well as to enable (echo on) or disable (echo off) such output. For example, the echo command. prints a new line without a dot, and echo . - point. Without parameters, the command displays information about its current status - echo on or echo off.</p><p>7. Rem provides the same functionality as a tag<! в HTML. Такая строка не является частью выполняемого кода. Вместо этого она служит для пояснения и предоставления информации о нем.</p><p>8. Pause allows you to interrupt the execution of commands in the bat file. This makes it possible to read executed lines before continuing the program. In this case, the message “To continue, press any key...” is displayed on the screen.</p><p>9. Set allows you to view or set environment variables. With the /p switch, the command prompts the user for input and saves it. With the /a parameter, it allows you to perform simple arithmetic operations, also assigning their result to a variable. When performing string operations, there should be no spaces either before or after the equals sign. For example, the set command displays a list of environment variables, set HOME displays the values ​​of arguments starting with “HOME,” and set /p input=enter an integer: prompts for an integer and assigns it to the corresponding variable.</p><p>10. Start "" [website] will launch the specified website in your default web browser.</p><p>11. If is used to check a certain condition. If it is true, then the next command is executed. There are 3 types of conditions:</p><ul><li>ERRORLEVEL number - checks the completion code of the last executed instruction to see if it matches or exceeds the specified number. In this case, 0 indicates successful completion of the task, and any other number, usually positive, indicates an error. For example, you can use nested commands to pinpoint the exit code: if errorlevel 3 if not errorlevel 4 echo error #3 occurred.</li><li>Line1 == line2 - checking whether two strings match. For example, if there is no external parameter, the if "%1"= ="" goto ERROR command will transfer control to the ERROR label.</li><li>EXIST name - checks the existence of a file with the specified name. For example, if not exist A:\program.exe COPY C:\PROJECTS\program.exe A: copies program.exe to drive A if it is not there.</li> </ul><p>12. Else must be on the same line as the If command. Indicates that the next instruction must be executed if the expression evaluates to false.</p><p><img src='https://i2.wp.com/syl.ru/misc/i/ai/324915/1862021.jpg' width="100%" loading=lazy loading=lazy></p><p>13. For is used to repeat certain actions on each member of a list. Has the format for %%argument in (list) do command. The argument can be any letter from A to Z. The list is a sequence of strings separated by spaces or commas. Wildcards can also be used. For example:</p><ul><li>for %%d in (A, C, D) do DIR %%d - sequentially displays the directories of drives A, C and D;</li><li>for %%f in (*.TXT *.BAT *.DOC) do TYPE %%f - prints the contents of all .txt-, .bat- and .doc-files in the current directory;</li><li>for %%P in (%PATH%) do if exist %%P\*.BAT COPY %%P\*.BAT C:\BAT - copies all batch files that exist in all directories of the search route to the C:\ folder WAT.</li> </ul><p>14. A colon (:) before a word forms a link from it, which allows you to skip part of the program code or go back. Used with the Call and Goto commands, indicating from which point the execution of the bat file should continue, for example, when a certain condition is met:</p><p>15. Variables:</p><ul><li>%%a represents each file in the folder;</li><li>%CD% - current directory;</li><li>%DATE% - system date, the format of which depends on the localization;</li><li>%TIME% - system time in the form HH:MM:SS.mm.;</li><li>%RANDOM% - generated pseudo-random number in the range from 0 to 32767;</li><li>%ERRORLEVEL% - exit code returned by the last executed command or bat script.</li> </ul><p>You can extract part of a string contained in a variable, given its position and length, like this:</p><p>%[variable]:~[start],[length]%. For example, you can display a date in the format DD/MM/YYYY as YYYY-MM-DD like this: echo %DATE:~6.4%-%DATE:~3.2%-%DATE:~0.2%.</p><p>16. (". \") - root folder. When working with the console, before changing the file name, deleting it, etc., you must direct the command action to a specific directory. When using a batch file, just run it in any desired directory.</p><p>17. %digit - accepts the values ​​of parameters passed by the user to the bat file. Can be separated by spaces, commas or colons. A "digit" is a number between 0 and 9. For example, %0 takes the value of the current command. %1 matches the first parameter, etc.</p><p>18. Shift - command used to shift input parameters by one position. Used when external arguments are passed to the batch file. For example, the following bat file copies the files specified as parameters on the command line to drive D:</p><p>if not (%1)==() goto next</p><p>In addition, you can perform the following manipulations with the arguments:</p><ul><li>%~ - remove surrounding quotes;</li><li>%~f - expand the parameter to the full path name along with the drive name;</li><li>%~d - show disk name;</li><li>%~p - display only the path;</li><li>%~n - select only the file name from the parameter;</li><li>%~x - leave only the extension;</li><li>%~s - convert the path to a representation with short names;</li><li>%~a - extract file attributes;</li><li>%~t - display the date and time of creation;</li><li>%~z - display file size;</li><li>%~$PATH: - Searches the directories listed in the PATH environment variable and expands the parameter to the first matching fully qualified name found, or returns an empty string if unsuccessful.</li> </ul><p><img src='https://i2.wp.com/syl.ru/misc/i/ai/324915/1862020.jpg' width="100%" loading=lazy loading=lazy></p><h2>Wildcards</h2><p>Many commands accept filename patterns - characters that allow you to match a group of filenames. Wildcards include:</p><ul><li>* (asterisk) - denotes any sequence of characters;</li><li>? (question mark) - replaces one (or 0) character other than a period (.).</li> </ul><p>For example, the dir *.txt command displays a list of txt files, and dir ???.txt displays a list of text documents whose name length does not exceed 3 letters.</p><h2>Functions</h2><p>Like subroutines, they are emulated using the call, setlocal, endlocal, and label commands. The following example demonstrates the possibility of defining a variable in which the result is stored on the call line:</p><p>call:say result=world</p><p><img src='https://i2.wp.com/syl.ru/misc/i/ai/324915/1862022.jpg' width="100%" loading=lazy loading=lazy></p><h2>Computations</h2><p>In bat files, you can perform simple arithmetic operations on 32-bit integers and bits using the set /a command. The maximum supported number is 2^31-1 = 2147483647, and the minimum is -(2^31) = -2147483648. The syntax is reminiscent of the C programming language. Arithmetic operators include: *, /, %, +, -. In the bat file, % (the remainder of an integer division) should be entered as “%%”.</p><p>Binary number operators interpret the number as a 32-bit sequence. These include: ~ (bitwise NOT or complement), & (AND), | (OR), ^ (exclusive OR),<< (сдвиг влево), >> (shift right). The logical negation operator is! (Exclamation point). It changes 0 to 1 and a non-zero value to 0. The combination operator is (comma), which allows more operations to be done in a single set command. The combined assignment operators += and -= in the expressions a+=b and a-=and correspond to the expressions a=a+b and a=a-b. *=, %=, /=, &=, |=, ^=, >>=, work the same way.<<=. Приоритет операторов следующий:</p><p>(); %+-*/; >>, <<; &; ^; |; =, %=, *=, /=, +=, -=, &=, ^=, |=, <<=, >>=; ,</p><p>Literals can be entered as decimal, hexadecimal (with leading 0x), and octal numbers (with leading zero). For example, set /a n1=0xffff assigns n1 a hexadecimal value.</p><h2>External commands</h2><ul><li>Exit is used to exit the DOS console or (with the /b option) only the current bat file or routine.</li><li>Ipconfig is a classic console command that displays network information. It includes MAC and IP addresses, and subnet masks.</li><li>Ping pings an IP address, sending data packets to it to estimate its distance and latency (response). Also used to set a pause. For example, the command ping 127.0.01 -n 6 pauses code execution for 5 seconds.</li> </ul><p>The library of commands in bat files is huge. Luckily, there are many pages on the web that list them all, along with batch script variables.</p><p><img src='https://i0.wp.com/syl.ru/misc/i/ai/324915/1862017.jpg' width="100%" loading=lazy loading=lazy></p><h2>Step 3: Write and run the bat file</h2><p>The following script will make your daily online activity much easier. What if you want to instantly open all your favorite news sites? Since scripts use console commands, you can create a script that opens each news feed in a single browser window.</p><p>Next, you should repeat the process of creating a bat file, starting with an empty text document. To do this, you need to right-click on an empty space in any folder and select “New”, and then “Text Document”. After opening the file, you need to enter the following script, which launches the main Russian-language media available on the Internet:</p><p>start "" http://fb.ru</p><p>start "" http://www.novayagazeta.ru</p><p>start "" http://echo.msk.ru</p><p>start "" http://www.kommersant.ru</p><p>start "" http://www.ng.ru</p><p>start "" http://meduza.io</p><p>start "" https://news.google.com/news/?ned=ru_ru&hl=ru</p><p>This script contains the start “” commands, which open several tabs. You can replace the suggested links with any others of your choice. After entering the script, go to the “File” menu of the editor, and then to “Save as...” and save the document with the .bat extension, changing the “File type” parameter to “All files” (*. *).</p><p>After saving, to run the script, just double-click on it. Web pages will instantly begin loading. If you wish, you can place this file on your desktop. This will allow you to instantly access all your favorite sites.</p><h2>Organizer</h2><p>If you download several files a day, then soon hundreds of them will accumulate in the “Downloads” folder. You can create a script that will organize them by type. Just place the .bat file with the program in the folder with unorganized data and double-click to run:</p><p>rem Every file in the folder</p><p>for %%a in (".\*") do (</p><p>rem check for the presence of an extension and non-belonging to this script</p><p>if "%%~xa" NEQ "" if "%%~dpxa" NEQ "%~dpx0" (</p><p>rem check for the presence of a folder for each extension, and if it is not there, then create it</p><p>if not exist "%%~xa" mkdir "%%~xa"</p><p>rem move file to folder</p><p>move "%%a" "%%~dpa%%~xa\"</p><p>As a result, files in the “Downloads” directory are sorted into folders whose names correspond to their extension. It is so simple. This batch script works with any type of data, be it a document, video or audio. Even if the PC does not support them, the script will still create a folder with the appropriate label. If there is already a JPG or PNG directory, the program will simply move files with this extension there.</p><p>This is a simple demonstration of what batch scripts can do. Whenever a simple task needs to be done over and over again, be it organizing files, opening multiple web pages, bulk renaming, or making copies of important documents, a batch script can help you get the tedious job done in a couple of clicks.</p> <p>Greetings! Today I decided to tell you about bat files, or batch files, as they are simply called. I assume that the use of bat files will be useful for every computer user, will expand capabilities and simplify the performance of many tasks.</p> <h2>What is bat and why is it needed?</h2> <p>Bat is a file extension (bat). Surely many users know that each file has its own extension. This is the last line after the period in the title. It is this “tail” that the system needs to identify as music, video, image or any other. You can even experiment. Take any image and rename it along with the extension. Windows will immediately notify you that you are changing the extension, and the file may not be detected by the system. Agree with the request and you will see that your picture is no longer displayed as an image. If you rename it as before, everything will be restored again. If extensions are not visible to you, you need to activate this function in Explorer, in the “View” tab.</p> <p>For Windows, bat is a file with instructions for certain actions that are contained in the file itself. An empty bat file will launch, but no actions will be performed. A batch file is a set of instructions for the Windows console.</p> <h2>How to create a bat file to run a program</h2> <p>To create a batch file, you need to launch a text editor, then save the file with the final name bat. If your editor does not have a saving function with such an extension, then you need to register it yourself. When we run such a file, a console will open and if there are no commands, it will close immediately.</p> <p>Now let's set the command to run the program. To do this, you need to open our created batch file in Notepad or another editor and enter the command.</p> <p><img src='https://i2.wp.com/softo-mir.ru/wp-content/uploads/2017/03/2-8.jpg' align="center" width="100%" loading=lazy loading=lazy></p> <p>Let's launch the browser as an example. You must first enter the Start command and after the space write Opera.</p> <p>It should look like this:</p> <p><b>Start Opera</b></p> <p><img src='https://i0.wp.com/softo-mir.ru/wp-content/uploads/2017/03/3-5.jpg' align="center" width="100%" loading=lazy loading=lazy></p> <p>This will work for programs known to the system, but if you launch software that is not known to the system, you will need to write the entire path to the program. For example, if you have ftp installed in the Program Files folder, then in order to start it you need to enter the command</p> <p><b>start filezilla</b></p> <p>And if the ftp client is installed in another folder, you will need to enter the entire path.</p> <p><img src='https://i1.wp.com/softo-mir.ru/wp-content/uploads/2017/03/4-3.jpg' align="center" width="100%" loading=lazy loading=lazy></p> <p>The scope of application of batch files is quite wide. You can enter a variety of commands into the configuration. You can find them out on the Internet. If you are interested in more detailed information on the commands, write in the comments and I will try to answer you. VBS works in a similar way. This is the same thing, only the commands are not executed through the console, and the commands are slightly different.</p> <p>This technology will help in performing various types of tasks, and in automatic mode. Some users even write viruses this way. To make it impossible to change the file configuration using a text editor, you need to convert the bat file to exe. This will help to make various auxiliary software that you can find on the Internet. For example, to convert bat to exe, the Bat to exe converter program will help.</p> <p>The bat function is very useful and sometimes necessary. Using it you can write entire programs with a narrow range of actions. The scope of application depends only on the knowledge of the commands and the ability to combine them. Therefore, use and expand your skills and ability to use a computer at the Super User level.</p> <p>BAT files are text documents that have a special extension. Commands are written into it for subsequent execution on the command line. By running the file, you activate the CMD program, it reads commands that are executed sequentially. This way you can make working with the command line easier while maintaining the desired order. Of course, you can enter all the commands at once into the command line manually, however, if you need to repeat the same operations, it is much more convenient to do this by automatically reading the list written in the form of a bat document. This option is also practical and convenient because you can subsequently change the order, add new processes that you need, and also remove unnecessary ones.</p><p>BAT helps automate processes: launching programs, archiving, backups. Therefore, it is useful to know how to create a bat file yourself, correct and supplement it. <br></p><h2><span>Working with bat using Notepad</span></h2><h3><span>Creation algorithm</span></h3><p>The process of working through Notepad is not at all complicated. If you have never done this before, you can handle it just fine by learning how to create a bat file and add commands to it. Let's start with creation. Here, follow the algorithm strictly:</p><p><img src='https://i0.wp.com/nastroyvse.ru/wp-content/uploads/2016/09/zapusk-bloknota-v-menu-pusk.jpg' width="100%" loading=lazy loading=lazy></p><ol><li>When you create a text document, you will initially get it with the txt extension. There are several ways to perform this operation, some depend on the level of Windows you have installed: <ul><li>In the folder you have chosen, right-click on the field, a menu will open, there we select “Create” - “Text document”;</li><li>Launch “Notepad” through “Start” by selecting “All Programs” - “Accessories” - “Notepad” (for Windows 7);</li><li>In later (after 7) versions of Windows, you can also open “Notepad” through “Start”: go through “All applications”, then “Accessories” - “Windows” and there select “Notepad” from the list;</li><li>Open the system command window using the Win + R combination, enter “notepad” in the line, click “Ok”.</li> </ul></li><li>Enter the command text. To try, write down, for example, “START taskmgr.exe” - start task manager. “START” tells the command interpreter that a program needs to be launched, then the program’s executable is indicated.</li><li>Specify the path where to save the created document.</li><li>Specify in the save window: <ul><li>in the “Type” line - “All files”;</li><li>in the “Name” line, enter the name and extension of bat, adding it after the name, placing a dot between the name and extension, for example, “file.bat”.</li> </ul></li><li>Click on “Save”.</li> </ol><p>A batch file with the extension .bat will appear in the folder you specified.</p><p><img src='https://i2.wp.com/nastroyvse.ru/wp-content/uploads/2016/09/sohranit-kak-bat-fajl.jpg' width="100%" loading=lazy loading=lazy></p><h3>Running a file</h3><p>It is easier to open a bat file by double-clicking on it with the mouse. The second method is to launch from the command line: enter the address where the document with the .bat extension that you saved is located.</p><h3>Editing</h3><p>If you want to change the document - add commands to the bat file, delete some of them, enter another program to work with it later - it is not difficult to do. Open the document using a text editor. It is convenient to do this by right-clicking on the bat file and selecting “Edit” in the menu that opens. Notepad will launch - there you can edit commands, change content, and make additions.</p><h2><span>Application of Dr.Batcher</span></h2><p>For a beginner who is just starting to work with the command interpreter and uses it quite rarely, Notepad is enough. If you want to reach a higher professional level, we recommend using the Dr.Batcher utility. In Dr.Batcher you can number pages, there is support for bookmarks, a list of system commands used in bat, entered commands are highlighted.</p><p><img src='https://i2.wp.com/nastroyvse.ru/wp-content/uploads/2016/09/Dr.Batcher-interfeys.jpg' width="100%" loading=lazy loading=lazy></p><h3><span>Creating a document</span></h3><p>The algorithm is simple and does not require special skills or professionalism. After downloading the utility, you can quickly do everything you need.</p><p>Launch Dr.Batcher.</p><ol><li>Open a new page: “File” - “New” or click on the blank sheet icon located under the “File” menu.</li><li>In the dialog box, click on “Empty Batch File”.</li><li>A program window will appear containing functions for working with bat.</li><li>After entering the required text, save.</li> </ol><h3>Editing</h3><p>If you need to change a bat file, this can be done in several ways in Dr.Batcher:</p><ol><li>Right-click on the icon and select “Edit with Dr.Batcher” from the menu.</li><li>Launch Batcher. Open the desired bat file by following the path:</li> </ol><ul><li>"File";</li><li>"Open";</li><li>specify the path to the document;</li><li>"Open".</li> </ul><p>Having followed one of the suggested paths, you will open the utility; there will be text in the window where you can make adjustments, change commands, supplement them, and delete unnecessary ones.</p><p><span class="kEU2vyOXwiY"></span></p><p>A bat file is useful when you need to automate tasks in Windows. Especially if it is necessary to perform actions in a certain algorithm several times (periodically or in a row). This is usually required when creating a directory system, bulk renaming files, and other simple and more complex operations. Having saved the order of actions, you can quickly and without wasting time on manually entering commands, you can start the process at any time, repeat it for different programs, entering only their name in the finished text. The recommendations on how to make a bat file outlined above will help you not only create them yourself, but also edit them.</p> <script>document.write("<img style='display:none;' src='//counter.yadro.ru/hit;artfast?t44.1;r"+ escape(document.referrer)+((typeof(screen)=="undefined")?"": ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth? screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";h"+escape(document.title.substring(0,150))+ ";"+Math.random()+ "border='0' width='1' height='1' loading=lazy loading=lazy>");</script> </div> </article> <div class="post-share"> <div>Share with friends or save for yourself:</div> <script src="//yastatic.net/es5-shims/0.0.2/es5-shims.min.js"></script> <script src="//yastatic.net/share2/share.js"></script> <div class="ya-share2" data-services="collections,vkontakte,facebook,odnoklassniki,moimir,gplus,viber,whatsapp,skype,telegram"></div> <br> <div id="post-ratings-14689-loading" class="post-ratings-loading"> <img src="https://unitarmy.ru/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image" / loading=lazy loading=lazy>Loading...</div> </div> <div class='yarpp-related'> <div class="related"> <div class="headline">We recommend articles on the topic</div> <div class="items"> <div class="item"> <div class="item__image"> <picture> <source media="(max-width: 479px)" srcset="/wp-content/themes/unitarmy.ru/cache/945f81849_460x250.png"><img src="/uploads/1bfab79eb8f72507f249eddfcd5361af.jpg" width="240" height="240" alt="How to open STL files? Programs. How to open a file with the extension .stl (using the example of the OpenSCAD program) Program for opening stl files" / loading=lazy loading=lazy></picture> </div> <div class="item__title"><a href="https://unitarmy.ru/en/bezopasnost/chem-otkryt-stl-faily-programmy-kak-otkryt-fail-s.html">How to open STL files? Programs. How to open a file with the extension .stl (using the example of the OpenSCAD program) Program for opening stl files</a></div> </div> <div class="item"> <div class="item__image"> <picture> <source media="(max-width: 479px)" srcset="/wp-content/themes/unitarmy.ru/cache/945f81849_460x250.png"><img src="/uploads/3d394b3bbcc0cf311c9e97c26393b0e3.jpg" width="240" height="240" alt="mht file what. How to open a .MHTML file? What is this file - MHT" / loading=lazy loading=lazy></picture> </div> <div class="item__title"><a href="https://unitarmy.ru/en/windows-7/fail-mht-chto-chem-otkryt-fail-mhtml-chto-eto-za-fail---mht.html">mht file what. How to open a .MHTML file? What is this file - MHT</a></div> </div> <div class="item"> <div class="item__image"> <picture> <source media="(max-width: 479px)" srcset="/wp-content/themes/unitarmy.ru/cache/945f81849_460x250.png"><img src="/uploads/3d394b3bbcc0cf311c9e97c26393b0e3.jpg" width="240" height="240" alt="How to open a DWG file online" / loading=lazy loading=lazy></picture> </div> <div class="item__title"><a href="https://unitarmy.ru/en/windows-8-1/chem-mozhno-otkryt-fail-s-rasshireniem-dwg-kak-otkryt-fail-dwg-onlain.html">How to open a DWG file online</a></div> </div> </div> </div> </div> </main> <aside class="sidebar"> <div class="amulets sidebar__section"> <div class="headline">Popular articles</div> <ul class="amulets__list"> <li class="amulets__list-item"><a href="https://unitarmy.ru/en/windows-7/chto-luchshe-otf-ili-ttf-chto-takoe-rasshirenie-faila-otf-tehnicheskie-svedeniya-o.html">What is the OTF file extension?</a></li> <li class="amulets__list-item"><a href="https://unitarmy.ru/en/razlichnye-problemy/sozdaem-fail-s-rasshireniem-bat-windows-7-chem-otkryt-fail-bat-ispolzovanie-bat-failov.html">Create a file with the extension bat windows 7</a></li> <li class="amulets__list-item"><a href="https://unitarmy.ru/en/noutbuki-i-netbuki/sredstva-mobilnogo-dostupa-k-hranimomu-kontentu-i-mobilnogo-udalennogo.html">What is the DS file extension?</a></li> <li class="amulets__list-item"><a href="https://unitarmy.ru/en/bezopasnost/gpx-chem-otkryt-na-kompyutere-chto-takoe-rasshirenie-faila-gpx-sozdat-fail.html">What is the GPX file extension?</a></li> <li class="amulets__list-item"><a href="https://unitarmy.ru/en/windows/skachat-prilozhenie-batle-net-skachat-prilozhenie-blizzard.html">Download the Blizzard App</a></li> </ul> <div class="amulets__all"><a href="https://unitarmy.ru/en/">View all articles</a></div> </div> <div class="sidebar__section sidebar__widget" id="recent-posts-3"> <div class="headline">Latest articles:</div> <ul> <li> <a href="https://unitarmy.ru/en/programmnoe-obespechenie/artefakty-i-klassovye-oploty-artefakty-i-klassovye-oploty.html">Artifacts and class strongholds How many levels of knowledge about the artifact</a></li> <li> <a href="https://unitarmy.ru/en/kompyuter-zhelezo/gaid-po-artefaktam-v-wow-legion-kak-poluchit-vse-obliki.html">How to get all artifact appearances?</a></li> <li> <a href="https://unitarmy.ru/en/razlichnye-problemy/karta-vov-3-3-5-po-urovnyam-alyans-rukovodstvo-dlya-nachinayushchih.html">Map of WWII 3.3 5 by alliance levels. A guide for beginning players: where to level up your character? Guide with location maps. Where to upgrade your character</a></li> <li> <a href="https://unitarmy.ru/en/windows/sochetanie-professii-wow-gaid-wow-battle-for-azeroth-luchshie-professii-dlya.html">WoW: Battle for Azeroth guide - the best professions for earning gold and leveling up</a></li> <li> <a href="https://unitarmy.ru/en/obzory/oploty-klassov-v-wow-legion-obzor-klassovyh-oplotov-v-legione-gde.html">Overview of class strongholds in the legion Where is the warlock stronghold located</a></li> <li> <a href="https://unitarmy.ru/en/windows/konvertiruem-izobrazheniya-png-v-ico-konvertiruem-izobrazheniya-png-v-ico-programma.html">Convert PNG images to ICO Program icon converter from png to ico</a></li> <li> <a href="https://unitarmy.ru/en/windows-8/preobrazovanie-faila-fb2-v-dokument-microsoft-word-konvertery-elektronnyh-knig-i-dokumentov-kak-kon.html">E-book and document converters How to convert word files to fb2</a></li> <li> <a href="https://unitarmy.ru/en/razlichnye-problemy/programma-dlya-konvertacii-epub-v-pdf-kak-preobrazovat-epub-fail-v-pdf-fail.html">How to convert EPUB file to PDF file</a></li> <li> <a href="https://unitarmy.ru/en/windows-8-1/kak-podklyuchit-veb-kameru-k-kompyuteru-instrukciya-po-podklyucheniyu-veb-kamery.html">Instructions for connecting a webcam</a></li> <li> <a href="https://unitarmy.ru/en/kompyuter-zhelezo/chto-takoe-standart-svyazi-4g-vidy-mobilnogo-interneta.html">Types of mobile Internet - deciphering abbreviations</a></li> </ul> </div> <div class="sidebar__section sidebar__widget" id="text-2"> <div class="textwidget"> </div> </div> </aside> </div> <footer class="footer"><nav class="footer__nav nav"><ul> <li class="menu-item type-post_type object-page "><a href="https://unitarmy.ru/en/feedback.html" itemprop="url">Feedback</a></li> <li class="menu-item type-post_type object-page "><a href="https://unitarmy.ru/en/sitemap.xml" itemprop="url">Site Map</a></li> <li class="menu-item type-post_type object-page "><a href="" itemprop="url">Advertising</a> <li class="menu-item type-post_type object-page "><a href="https://unitarmy.ru/en/feedback.html" itemprop="url">About the site</a></li> </ul></nav><div class="footer__inner"><div class="footer__copyright" style="background:none;"> <div class="footer__copyright-title1"></div> <p>© 2023. All rights reserved <br />Basics of working on a personal computer</p> </div><div class="footer__counters"></div><div class="footer__info"><p></p></div></div></footer> </div> </div> <script type="text/javascript" defer src="https://unitarmy.ru/wp-content/script.js"></script> </body> </html>