Skip to content

Instantly share code, notes, and snippets.

Created June 11, 2010 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/434058 to your computer and use it in GitHub Desktop.
Save anonymous/434058 to your computer and use it in GitHub Desktop.
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment