Skip to content

Instantly share code, notes, and snippets.

Created June 11, 2010 04:55

Revisions

  1. @invalid-email-address Anonymous created this gist Jun 11, 2010.
    8 changes: 8 additions & 0 deletions read_my_code_21.pyw
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    import os,fnmatch;
    rootDir = ".";
    fileGlob = "*.txt"

    for arg in rootDir:
    for dirpath, dirnames, filenames in os.walk(arg):
    for filename in [f for f in filenames if fnmatch.fnmatch(f,fileGlob)]:
    fullFileName = os.path.join(dirpath, filename);