Remove first line of 100 files in a folder using python script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tatiana Louisa
    New Member
    • Mar 2011
    • 1

    #1

    Remove first line of 100 files in a folder using python script

    Hi,

    I am a bit new in python. Would be nice to get some help. I would like to remove the first line of 100 files in a folder. How can i proceed to write a python script. I can do it for a single file, but dont know how can I modify my script to run it for a folder containing 100 files with .txt extension.

    Tatiana
  • dwblas
    Recognized Expert Contributor
    • May 2008
    • 626

    #2
    I can do it for a single file
    Place that code in a function and pass each file name to the function.

    Comment

    • Bishop Manu
      New Member
      • Mar 2011
      • 5

      #3
      folder='\locati on of the folder'
      for file in folder:
      (do your stuff here)

      Comment

      Working...