My files in a directory are monthly data spanning several years, with characters like 0001-01-01, 0001-02-01, ..., 0005-01-01, ..., 0010-12-01 (yyyy-mm-dd) in the middle of each file name.
Now, I would like to exclude say the 0001* files.
If I wrote sorted(glob.glob(mydirectory/filename-000[!1]*))
only gives me 0002 ~~ 0009 files, while the 0010 files are not included.
What should I do to only exclude the 0001* files?
If I wrote sorted(glob.glob(mydirectory/filename-000[2-9]*))
also only gives me 0002-0009 files, what should I do to include the 0010* files?
I also tried filename-{000[2-9],00[10-12]}*
, which does not work.
Thanks,