Batch File is created to run scripts from command line. In this example we will create batch file to run python script.
How to create batch file:
To Create Batch file first we need to open Notepad++ and then write
“File location” space “Script location”
“C:\python. exe” “C:\hello.py”
pause
and save it with the extension of .bat.
Batch file is created you can double click on it and python script is executed.
It can be also used in automation of task using Task scheduler.