Chances are it's using legacy Windows APIs. You can check out the vfp2c32.fll 
VFPX project, which has wrappers around a ton of more current Windows APIs, if 
you want to use them.

<https://github.com/ChristianEhlscheid/vfp2c32>

--

rk

-----Original Message-----
From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Charlie Coleman
Sent: Wednesday, March 25, 2020 4:58 PM
To: profoxt...@leafe.com
Subject: Re: Best way to move a file (other than COPY FILE and DELETE FILE)

Actually, I think VFP is using the Windows "rename" API (whatever it's
called) to do the function.

A long time ago I did a test between a C program to 'move files' and a VFP app 
to 'move files'. Something like several thousand files, over a Gigabyte as I 
recall. VFP was just as fast. In fact it was all so fast I had to run things a 
few times, different folders, immediately editing the moved files, etc, to 
convince myself it was really working (I did not want some weird 'Windows 
caching' to bite me).

-Charlie

On Wed, Mar 25, 2020 at 4:37 PM Mike <m...@ggisoft.com> wrote:

> Just my 2 cents, but I would venture a guess that what VFP is actually 
> doing in the background to perform a "RENAME" is to
> -- copy the file to the new location
> -- delete the original
>
> But, it is more convenient to do one step (for your application) than two.
>
> Mike
>
> MB Software Solutions, LLC wrote:
> > Hmmm...I didn't realize that would work for this....figured it was 
> > just for the files in the directory where they existed, but sure 
> > enough, from the VFP help text:  "If FileName1 and FileName2 are in 
> > different directories or folders, FileName1 is moved into the 
> > directory or folder of FileName2."
> >
> > Thanks!
> > --Mike
> >
> >
> > On 3/25/2020 3:51 PM, Vince Teachout wrote:
> >> The vfp RENAME command:
> >>
> >>     RENAME (currentpath\file)   TO (newpath\file)
> >>
> >>
> >>
> >> On 03/25/20 3:44 PM, MB Software Solutions, LLC wrote:
> >>> VFP9SP2 on Win10 Pro clients
> >>>
> >>> We've got a document management system (DMS) we wrote for a client 
> >>> and we need to "archive" some files by moving them to a subfolder 
> >>> from the main one.  The first idea is to use VFP's COPY FILE 
> >>> command and then just delete it once done.  I wanted to ask if 
> >>> anyone had a better idea.
> >>
> >
> >
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/mwhpr1001mb2144b7ce871254c85b08e287d2...@mwhpr1001mb2144.namprd10.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to