I have the following .bat script which is located on the Desktop. I have a python script which resides in a folder ("Folder") also on the Desktop. I can run the .bat script if both files are on the same directory but how I can access the python script when it's in "Folder"? I want this to run on other computers so I am trying to avoid defining usernames (eg. C:\Users\user_name\Desktop) unless there is a generic way to obtain user names and incorporate that into the .bat file.
The following is the .bat script:
@echo off
rem Root OSGEO4W home dir to the following directory
call "C:\OSGeo4W64\bin\o4w_env.bat"
echo.
cmd /k python "Script.py" 
@echo on
I tried inserting cd Folder before cmd /k python "Script.py but that only sets the directory and doesn't follow on to run the python script.
Any advice is appreciated!



cmdat all? I think you can run python directly from the.batfile. That might not solve your main question, but it would be a more natural way to execute a Python script from a.batfile.