I can't find an api call for a simple rename, leading to my question: Is
rename *always* a copy/erase function?
-Lew

Re: Is rename always copy/erase? by fpicanza

fpicanza
Thu Sep 13 07:12:06 PDT 2007

On Sep 13, 9:58 am, Lew <L...@discussions.microsoft.com> wrote:
> I can't find an api call for a simple rename, leading to my question: Is
> rename *always* a copy/erase function?
> -Lew

I think Rename is more like a MOVE than like a COPY/ERASE. A MOVE
simply modifies the File Allocation Table (fast) but doesn't shift
bytes around unlike a COPY (copies bytes... slow) followed by an Erase
(wipe the file in the File Allocation Table...fast). Move/Rename
should be faster than Copy.

But should anyone know better (I didn't necessarily stay current with
all version), feel encouraged to contradict me :)

-Francois


Re: Is rename always copy/erase? by Michael

Michael
Thu Sep 13 11:32:11 PDT 2007

You may find the MoveFile Win32 API function handy. It works efficiently
and handles mixed case file names, as well as directories. See:

http://www.news2news.com/vfp/?group=27&function=20

Mike

"Lew" <Lew@discussions.microsoft.com> wrote in message
news:8AA42077-202A-4B47-80F6-06F9EEE351AA@microsoft.com...
>I can't find an api call for a simple rename, leading to my question: Is
> rename *always* a copy/erase function?
> -Lew



Re: Is rename always copy/erase? by Gene

Gene
Thu Sep 13 10:56:49 PDT 2007

Lew <Lew@discussions.microsoft.com> wrote:

>I can't find an api call for a simple rename, leading to my question: Is
>rename *always* a copy/erase function?

Why not use the VFP command?
RENAME FileName1 TO FileName2

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

Re: Is rename always copy/erase? by Lew

Lew
Thu Sep 13 11:42:03 PDT 2007

I have a perverse sense of purpose.

"Gene Wirchenko" wrote:
> Why not use the VFP command?
> RENAME FileName1 TO FileName2
>
> Sincerely,
>
> Gene Wirchenko