title: How to use glob.glob to combine txt files and add a string to break up the txt?
body: <p>I'd like to combine a bunch of txt files but I would also like to add something at the end of each file so I know where one file ends and the other begins (in this case I used "###############")</p>
  
  <p>If I use individual files and read through them, this code works, but I would just like to be able to read through a directory of files by using glob.glob.  When I do so, I'm getting a blank outfile.  Can someone please explain why this is happening?</p>
  
  <p>Thanks!</p>
  
  <pre><code>import glob
  with open("concatenated.txt",'w') as outfile:
      for files in glob.glob('\\home\\wra\\Desktop\\combine\\*.txt'):
          for fname in files:
              with open(fname) as infile:
                  outfile.write(infile.read() +"\n\n##################\n\n")
  </code></pre>