Date: Mon, 19 Jan 1998 13:26:54 +0200 (IST) From: Eli Zaretskii To: Davide Rossi cc: djgpp AT delorie DOT com Subject: Re: moving a file In-Reply-To: <69ubvo$ebi@leporello.cs.unibo.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 19 Jan 1998, Davide Rossi wrote: > I have to implement a move file operation in a program I'm writing. Use the ANSI-standard function `rename'. It's part of DJGPP library. > With dos interrupts the only thing I've been able to find is a win95 (long > file names) operation, and I'd like to avoid that. `rename' will use whatever appropriate (long file name function when long names are supported, short names otherwise). I don't see how this should be of any concern to the application. > Copying the file then removing the source is slow and messy But it's the only way to go when you need to move a file to another disk. So if moving files to another disk is required, you will need to watch the status returned by `rename', and if it indicates a failure, use the copy/delete thing instead.