What is a good way to join files together?
Posted: Fri Dec 10, 2004 6:25 pm
Hi all,
I have written a program which successfully downloads a file from a web site. The file is downloaded in 1MB chunks. The end result being that I have approx. 200 "chunks" in my temporary folder and I need a bullet-proof way to stitch them back together again into a single file.
Does anyone have any suggestions as how best to achieve this? I thought I could use OpenFile to create my new file and then read in each chunk one after the other and write the data out with WriteData, but I am worried that the file buffer will never actually save until I call CloseFile (or the app ends?) and i'll fill up my memory with 200MB+ worth of file buffer data.
Any ideas very welcome.
Thanks,
Rich
I have written a program which successfully downloads a file from a web site. The file is downloaded in 1MB chunks. The end result being that I have approx. 200 "chunks" in my temporary folder and I need a bullet-proof way to stitch them back together again into a single file.
Does anyone have any suggestions as how best to achieve this? I thought I could use OpenFile to create my new file and then read in each chunk one after the other and write the data out with WriteData, but I am worried that the file buffer will never actually save until I call CloseFile (or the app ends?) and i'll fill up my memory with 200MB+ worth of file buffer data.
Any ideas very welcome.
Thanks,
Rich