Mail Archives: djgpp/1998/01/19/23:54:46
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.
- Raw text -