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

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -