Date: Mon, 19 Jan 1998 10:38:17 +0200 (IST) From: Eli Zaretskii To: Paul Derbyshire cc: djgpp AT delorie DOT com Subject: Re: moving a file In-Reply-To: <69utdk$rag@freenet-news.carleton.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 19 Jan 1998, Paul Derbyshire wrote: > Flame me if I'm wrong, but isn't there a libc function for moving files? It's called `rename'. It's even ANSI C. The DJGPP's version can move entire directories (not across drives, though). One thing you should be aware of is that, unlike other DOS implementations, it will overwrite the destination, even if it is write-protected, because this is what POSIX says. There is also a simpler and more low-level `_rename'. Look them both up in the libc reference.