Run Bat File using Python
Important things to take note of -->
If You want to pause for result just type some extra inputs as this code wont wait for you to see output in cmd
You can also use some keys to exit the command prompt
If you are showing some output on cmd just put an input at last line of code.
echo --> print stuff on command prompt.
on --> to show what are we outputting
& --> first performs the task on left and then the task on right
python3 --> global variable for python
-x --> version
"%~f0" --> % - Specifier
f0 - to get the complete path of the file (python in our case)
~ - to remove double quotes if any
goto - to go to the defined label
:eof - end of file (predefined label)
first printing python3 on cmd to run then getting the complete path for the file.
if the file is not found terminate the program (eof)
else run the script under Python