I have a folder with a python script, supporting files (data that gets placed into the folder) and a .command file to launch the script.
The command file is simple:
cd /Users/me/Dropbox/MyBot
python do_automation.py
The problem is, I can't just have it be python script.py, I have to cd into the directory using absolute path first. This makes sharing it with others difficult as I have to change the path for the directory to match with where the folder has been copied to.
Is there not a way for the .command to just start in the folder/directory in which it is located? You'll note it's in a dropbox folder, that isn't important as I'm not sharing that specific folder with anyone, simply copying it all to their computer.
I would like to just copy the folder to anyone I want and have them simply click on the .command file to have it do the thing!