Skip to content

Instantly share code, notes, and snippets.

@soltys
Created February 17, 2014 14:16
Show Gist options
  • Save soltys/9051361 to your computer and use it in GitHub Desktop.
Save soltys/9051361 to your computer and use it in GitHub Desktop.
List all files with extension which not contain string
import os
for file in os.listdir("."):
if file.endswith(".HTM"):
f = open(file)
if f.read().find("successfully") == -1:
print file
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment