A BAT file is a batch file called a batch file. Probably the best-known BAT file may well be the autoexec.Bat, which has been used since MS-DOS to Windows 98. Batch files are mainly used for repetitive tasks.
Although a BAT file behaves like an exe (double-clicking it starts), it's actually just a text file with a different extension. This contains command scripts that are processed by the command line interpreter. If you double-click a BAT file, the window for opening an MS-DOS window appears, where text files can be edited while processing the BAT file. This is the command line interpreter.
Even if the possibilities of a batch script are limited, many everyday tasks can be performed with BAT files, above all file operations and network tasks, but also shutting down the computer or re-registering a user are possible.
Note that you should never run BAT files from an unknown source. On the one hand they can contain viruses or malicious code and on the other hand batch scripts can also delete files or format the hard disk. A look with a text editor in such a file is definitely useful. Especially when such commands as format, ren or del are in it is advised to be careful.