I am trying to create a batch file to automatically add my python folder to the Environment Path. Below is my environment variables before the file was run.
And this is the file I ran (Note the bat file is in the same directory as the python folder):
@echo OFF
setx path "%path%;%cd%\Python36"
This file added python to path (see the red underline) but also added a bunch of other folders to the path (blue circle). I am confused as to why this occurred. Any help would be greatly appreciated!

PATHvariable before you changed it. Those are pretty standard.Python36folder path to userPATH? Why not writing the path for example into a file located in"%APPDATA%\YourAppName\PythonPath.cfg"and reading it from this file? Or what about adding to user environment variables list withsetx MyAppPythonPath "%CD%\Python36"the Python path and your program or script uses environment variableMyAppPythonPathand do not depend on localPATHandPATHEXT? Or what about adding Python path to registry keyHKCU\Software\MyAppwith valuePythonPathand querying this registry value from Windows registry?