I wanted to copy and paste specific lines and write in to all files in folders and sub folder
<pre><code>import os
from fnmatch import fnmatch

root = 'path'
pattern = "*.txt files"

for path, subdirs, files in os.walk(root):
    for name in files:
        if fnmatch(name, pattern):
            print os.path.join(path, name)
</code></pre>

<p>I have a folder contains sub folders contains text files I need to copy 100 lines and copy to specific are in all the folder contains same data  </p>
