A Windows batch file is a type of text file, which contains a series of commands for a computer's operating system. You should not open batch files on your hard disk that are unknown as they contain executable commands. The file extension for batch file is .BAT. The Temp files (Temporary files) are created by system programs essentially when the programs cannot get the appropriate level of memory to complete a task. Using batch files you can view, access and erase the content of the temporary files as you would do in the Command prompt by typing a specific set of commands.