Hi there again..
I have a phython script named script.py everytime i want to use it i need to shift+right click mouse then navigate to open command window here / CMD then type the syntax "script.py -e filename"
Is there a way that a batch script can run a phython script, making it more easier
Thank you,
How to run python script using batch
Moderator: DosItHelp
-
- Expert
- Posts: 1160
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: how to run phyton script using batch
If the filename changes frequently:
If the filename will never change:
Code: Select all
@echo off
set /p fname=Enter the full path of the file to use:
script.py -e "%fname%"
If the filename will never change:
Code: Select all
@echo off
script.py -e filename
Re: How to run python script using batch
Thanks thief..
The code was so simple, but very useful
The code was so simple, but very useful