This is a stupid question, and I know it is, but for some reason I can't find any useful tutorials for running python from windows command prompt so I'll have to ask you guys. I have a script I need to run on all files starting FY*.txt or WS*.txt in one directory. I've tried going to the directory through command prompt and doing
for file in FY*.txt; do python my_script.py
which just informs me that 'file' is unexpected at this time. I've also tried
python my_script.py FY1.txt FY2.txt FY3.txt
with
import sys
inputfilenames=sys.argv[1:27]
for name in inputfilenames:
datafile=open(name,'r')
as the way I open my files in the python script itself. This seems to only run the script on one file, rather than all of them.
I apologise for my ignorance, I really have no clue how to use command prompt to run python things. As well as answers, if anyone has any tutorial recommendations I would be very, very grateful.