title: Trying to find specific words from all files in a directory using python
body: <p>I have almost 200 files in a directory and I am looking for specific 
  words such as <code>username</code>, <code>pin</code>, and <code>schema</code> in these 200 files.
  The question is how can I improve the below script to look for the words from all the files in the directory. My current script can search for words from only one file and add line numbers.
  Below is my script:</p>
  
  <pre><code>from os import system, listdir,path
  import time
  system("cls")
  system("color b9")
  with open("C:\Users\ilan\Desktop\kobi.txt") as filee:
  for line in filee:
      for word in line.split():
          if word.lower() =="user" or word.lower()=="password" or word.lower()=="username" or word.lower()=="pass" or word.lower()=="secret" or word.lower()=="key" or word.lower()=="backdoor" or word.lower()=="ip":
                  FILE=open("CodeR.txt","a")
                  FILE.write(word + "\n" )
                  #count =1
                  #FILE.write(str(count)+word + "\n" )
                  #count+=1
                  FILE.close()
  </code></pre>