I am new to python and wanted to make a simple script that acted like the ls
command in a mac/linux terminal but for cmd in windows. The code itself works and if I run the script using python ls_script.py
in my cmd
it works fine. However, I want to make it so that I can run it in any active directory by just typing in ls
in my cmd
. I made an environment variable in cmd
called ls
that has a value of python ....\ls_script.py
, which assumed would work since if i were to type that exact thing in manually, it works. However, when I just type in ls
, it gives the following error:
"'ls' is not recognized as an internal or external command, operable program, or batch file."