[Tutor] concatenating files
Bala subramanian
bala.biophysics at gmail.com
Fri Feb 27 15:33:24 CET 2009
Hai,
I have file1.dat,file2.dat...file 300.dat in one directory. I want to
concatenate all the files in a single file (total.dat) with a string "END"
separating the file contents.
my total.dat should be
file1.dat contents
END
file2.dat contents
END
----
----
file300.dat.
now i have another 400 such *.dat files in another directory whose contents
i hve to append to "total.dat", how can i do this task. i need to do
something like, updating the file total.dat without overwritting it.
Thanks,
Bala
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090227/63e45b05/attachment-0001.htm>
More information about the Tutor
mailing list