Date: Sun, 31 Dec 2000 20:56:53 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Tim Van Holder" Message-Id: <1225-Sun31Dec2000205652+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp-workers AT delorie DOT com In-reply-to: Subject: Re: DOZE and WINDOZE versions References: Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Tim Van Holder" > Date: Sun, 31 Dec 2000 16:42:15 +0100 > > > I've tried running "mv a b" with success. Doesn't mv use rename()? > No; IIRC, it is basically a cp followed by an rm, code-wise. Actually, `mv' tries to call `rename' first, and only if that fails, it falls back on copy/remove. > Below is a simple program that lowercases all file and directory > names in the current dir. Does this work on WinME too? As I wrote elsewhere, the problems which were reported on c.o.m.d. had to do with the target of rename already existing. > strcpy (lowername, name); > strlwr (lowername); > if (strcmp (name, lowername) != 0) { > printf ("%s -> %s\n", name, lowername); > if (rename (name, lowername) != 0) { This is not supposed to work with stock v2.03. I only committed yesterday the changes that make this work, so before that, even the CVS version won't DTRT.