Created
February 17, 2014 14:16
-
-
Save soltys/9051361 to your computer and use it in GitHub Desktop.
List all files with extension which not contain string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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