Skip to content

Instantly share code, notes, and snippets.

@ziplizard
Created April 7, 2015 21:42
Show Gist options
  • Save ziplizard/332977fbe9366c50c883 to your computer and use it in GitHub Desktop.
Save ziplizard/332977fbe9366c50c883 to your computer and use it in GitHub Desktop.
exclude = set(['Plugin/DebugKit','Vendor','webroot/min'])
for root, dirs, files in os.walk('/var/www/html/myproject/app', topdown=True):
dirs[:] = [d for d in dirs if d not in exclude]
for file in files:
if file.endswith(('.php','.ctp')):
print root, '/', file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment