python - Search for a file using a wildcard -
I should get a list of filenames with a search pattern with wildcards. Such as:
getFilenames.py c: \ PathToFolder \ * getFilenames.py c: \ PathToFolder \ FileType * .txt getFilenames.py C: \ pathpolder \ FileTypeA.txt
How can I do this?
like this:
& gt; & Gt; & Gt; Import Globe & gt; & Gt; & Gt; Glob.glob ('./ [0-9]. *') ['./.g.g ",' ./2.txt '] & gt; & Gt; & Gt; Glob.glob ('* .gif') ['1.gif', 'card.gif'] & gt; & Gt; & Gt; Glob.glob ('.gif') ['1.gif']
It comes directly from here:
Comments
Post a Comment