The script looks something like this:
- Code: Select all
for file in sys.argv[1:]:
f = open(file, 'r+b')
print "wrote " + file
So as you can see from this I have to list every file that I want to modify as an argument on the command line. For instance; myscript.py file1.ab file2.ab file3.ab
My question is, is there someway I can modify this script so that it will open every file in a directory that has an extension .ab? Something like myscript.py *.ab
Please be gentle with any suggestions, I'm not a coder...