Mail Archives: djgpp/1998/01/19/18:30:16
At 01:58 1/19/1998 GMT, Davide Rossi wrote:
>Hi all,
>I have to implement a move file operation in a program I'm writing.
>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.
>Copying the file then removing the source is slow and messy, I think there
>must be a way to do that messing with the fat or something like this but I've
>not been able to find any useful information on the web, hints anyone?
The libc function `rename' will do this for you. If the source and
destination are on different drives, though, you'll have to go back to the
old way. (The function `link' may be able to do some of your work for you,
but beware! On Unix it may not do what you expect, and it won't work between
drives there.)
Nate Eldredge
eldredge AT ap DOT net
- Raw text -