www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/19/18:30:16

Date: Mon, 19 Jan 1998 12:26:09 -0800 (PST)
Message-Id: <199801192026.MAA04213@adit.ap.net>
Mime-Version: 1.0
To: rossi AT cs DOT unibo DOT it (Davide Rossi), djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: moving a file

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019