I want to do something like this:
c:\data\> python myscript.py *.csv
and pass all of the .csv files in the directory to my python script (such that sys.argv
contains ["file1.csv", "file2.csv"]
, etc.)
But sys.argv
just receives ["*.csv"]
indicating that the wildcard was not expanded, so this doesn't work.
I feel like there is a simple way to do this, but can't find it on Google. Any ideas?