parse text files in a directory?

jo3c JO3chiang at gmail.com
Tue Jan 1 21:32:30 EST 2008


hi everybody
im a newbie in python, i have a question

how do u parse a bunch of text files in a directory?

directory: /dir
files: H20080101.txt ,
H20080102.txt,H20080103.txt,H20080104.txt,H20080105.txt etc......

i already got a python script to read and insert a single text files
into a postgres db.

is there anyway i can do it in a batch, cause i got like 2000 txt
files.

thanks in advance

joe



More information about the Python-list mailing list