Jan-02-2018, 11:52 AM
A batch file is just a series of commands to be executed in the command line. If you have ever executed your script from the command prompt you already know all you need.
Create a text file and write down the steps you would follow to execute your python script:
1. You change the directory to where the script is located.
2. run the script
So your text file would look something like this:
Points to note:
1. Ensure that Python is added as an environment variable
2. Batch files are wonderful for a multitude of other things. Check it out!
Create a text file and write down the steps you would follow to execute your python script:
1. You change the directory to where the script is located.
2. run the script
So your text file would look something like this:
Quote:cd C:\\Users\\Location_of_scriptThen rename the text file with a '.bat' extension. Now put this file in the startup folder.
python script.py
Points to note:
1. Ensure that Python is added as an environment variable
2. Batch files are wonderful for a multitude of other things. Check it out!