Message-ID: <37383CFA.A4A1E0C1@vortex.ufrgs.br> Date: Tue, 11 May 1999 11:21:47 -0300 From: "Luciano R. M. Silva" X-Mailer: Mozilla 4.51 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Copy files References: Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit X-Original-NNTP-Posting-Host: prt13u14.ez-poa.com.br Lines: 12 NNTP-Posting-Host: irc.ez-poa.com.br To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com It's very simple:

1. Allocate some buffer (say 4K to 64K)
2. Open 2 file handlers (source and destination files - use binary mode!)
3. Read from source and write to destination (using buffer size)
4. Do 3 until the block read is smaller than the buffer (last block)
5. Close both handlers and it's done (can free buffer :) )

(6. Ok, maybe you can put some error handling somewhere...)