How to run .bat files from Runbox? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to run .bat files from Runbox?

Running on Windows 10 Trying to create a batch file so I can run .py scripts through the Run Bar. Here is the batch file text: @"C:\Python\python.exe" "C:\Python\MyScrpits\pw.py" %* @pause My problem isn't with the batch file. When I click it, it runs. I can't figure out why I get this error message when I type the scrpit name in the Run Box: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.752.0_x64__qbz5n2kfra8p0\python3.8.exe: can't open file 'C:\Python\MyScrpits\Simple': [Errno 2] No such file or directory I went and edited the system enviornment variables to include the folder with the scripts but still get that message. What am I missing here? I also noticed it wasn't searching the intended path. The error message says it cant open the file in 'C:\Python\MyScripts\Simple' this is true because I have no directory with that name. Need some guidence in how to point the command to open from (for example) 'C:\Python\MyScripts' instead of the non-existent directory

9th Apr 2020, 1:45 PM
Slick
Slick - avatar
2 Answers
+ 1
"Path where your Python exe is stored\python.exe" "Path where your Python script is stored\script name.py" pause You’ll need to adjust the code in two places: “Path where your Python exe is stored\python.exe” In my case, the Python exe is located at: “C:\Users\Ron\AppData\Local\Programs\Python\Python37-32\python.exe” “Path where your Python script is stored\script name.py” And in my case, the Python script that I wish to run is located at: “C:\Users\Ron\Desktop\MyPython\simple_gui.py” “C:\Users\Ron\AppData\Local\Programs\Python\Python37-32\python.exe” “C:\Users\Ron\Desktop\MyPython\simple_gui.py” pause
19th May 2020, 8:41 AM
Kamal
Kamal - avatar
+ 1
Thanks i appreciate it! I was having a huge problem with spaces in my file names causing the environment variable to malfunction. But now Im on linux now so no problems! Plus i finally learned how venvs work.
19th May 2020, 8:53 AM
Slick
Slick - avatar