By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,767 Members | 2,114 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,767 IT Pros & Developers. It's quick & easy.

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

P: 1
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
Mar 17 '11 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 624
I can do it for a single file
Place that code in a function and pass each file name to the function.
Mar 18 '11 #2

P: 5
folder='\location of the folder'
for file in folder:
(do your stuff here)
Mar 18 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.