title: Python script deletes too many lines
body: <p>I have a task to delete first 4 lines in 700 files. I wrote a script which deletes first 4 lines and copy modified file to a new directory. When I compared 2 files i.e. original and new one I noticed that it deleted first 4 lines and last 4 lines. This was not my goal, i.e. all lines should be the same except first 4 lines. Do you have an idea why it truncates last 4 lines and how to fix it?
  Thanks:</p>
  
  <pre><code>fileList = os.listdir(sys.argv[1])
  
      for file in fileList:
          absFile = os.path.join(os.path.abspath( sys.argv[1]), file )
          fileName = file
          FILE2 = open( fileName, 'w' )
          with open( absFile, 'r' ) as FILE:
              FileLines = FILE.readlines() 
              for line in FileLines:
                  nline = line.rstrip()
                  if FileLines.index(line) &lt; 4:
                      continue
                  else:
                      FILE2.write(line)
              shutil. copy( fileName, sys.argv[2] )
  
          FILE2.close()
          os.remove( fileName )
  
  if __name__ == '__main__':
      main()
  </code></pre>