This may be more of a general Windows question than a Python question, I'm not sure.
I have a folder full of python files called GDAL (a geospatial library). The location of the GDAL library is stored in the windows system PATH, so when I type this in a windows command window to check PATH is configured correctly:
gdal_retile.py
I get notepad opening to show the code, as I would expect, as this is the default application for .py files on this pc.
If however I do this:
python gdal_retile.py
It doesn't work, it says
no such file or directory
Yet if I define the full path:
python "C:\Program Files\GDAL\gdal_retile.py"
It works fine. Can't PATH be used as part of an argument to the Python interpreter?