A few additional remarks:
* readdir gives you all the 'files' in the directory, including ., .., directories etc.. You should filter out the file you want.
* Why not use a simple cat *.htm >all.htm ? You get the same useless file with less effort...
Paul
Comment on Re: combining multiple files into one file