I'm rewriting a routine in VFP8 (XP Pro) to back up about 4,000 small
files, averaqing about 5k each, from about 5 folders from the hard
disk to a USB mini hard drive. I'm considering two approaches:

1. Using XXCopy.exe with the RUN command or ShellExedute.

2. Using only the built-in COPY FILE command.

I have a feeling XXCopy would be faster, but I haven't tested it.
Could someone confirm that? Or is it an "it depends" situation in
which case I'll go ahead and test it.

Thanks for any help.

Steve M.

Re: Which is faster - COPY FILE or XXCopy? by bork

bork
Mon Sep 24 19:35:16 PDT 2007

VFP's copy file command will max out bandwidth on a 100mb network with
minimal cpu usage. What is the bandwidth into your USB drive? IIRC, they
tend to be relatively slow, and you may find that the bottleneck is the
drive itself, not the software doing the file copy.

I would recommend you try it both ways and see - that is the only way to
tell for sure. My first guess is that you won't notice any speed
differences. You might notice differences in cpu consumption.


"Steve Meyerson" <stevemeyerson@cox.net> wrote in message
news:esggf3dfqrml924e60q72aqueu91oorvon@4ax.com...
> I'm rewriting a routine in VFP8 (XP Pro) to back up about 4,000 small
> files, averaqing about 5k each, from about 5 folders from the hard
> disk to a USB mini hard drive. I'm considering two approaches:
>
> 1. Using XXCopy.exe with the RUN command or ShellExedute.
>
> 2. Using only the built-in COPY FILE command.
>
> I have a feeling XXCopy would be faster, but I haven't tested it.
> Could someone confirm that? Or is it an "it depends" situation in
> which case I'll go ahead and test it.
>
> Thanks for any help.
>
> Steve M.



Re: Which is faster - COPY FILE or XXCopy? by Tom

Tom
Mon Sep 24 19:55:36 PDT 2007

On Sep 24, 10:35 pm, "bork" <b...@bork.com> wrote:
> VFP's copy file command will max out bandwidth on a 100mb network with
> minimal cpu usage. What is the bandwidth into your USB drive? IIRC, they
> tend to be relatively slow, and you may find that the bottleneck is the
> drive itself, not the software doing the file copy.
>
> I would recommend you try it both ways and see - that is the only way to
> tell for sure. My first guess is that you won't notice any speed
> differences. You might notice differences in cpu consumption.
>
> "Steve Meyerson" <stevemeyer...@cox.net> wrote in message
>
> news:esggf3dfqrml924e60q72aqueu91oorvon@4ax.com...
>
>
>
> > I'm rewriting a routine in VFP8 (XP Pro) to back up about 4,000 small
> > files, averaqing about 5k each, from about 5 folders from the hard
> > disk to a USB mini hard drive. I'm considering two approaches:
>
> > 1. Using XXCopy.exe with the RUN command or ShellExedute.
>
> > 2. Using only the built-in COPY FILE command.
>
> > I have a feeling XXCopy would be faster, but I haven't tested it.
> > Could someone confirm that? Or is it an "it depends" situation in
> > which case I'll go ahead and test it.
>
> > Thanks for any help.
>
> > Steve M.- Hide quoted text -
>
> - Show quoted text -

One difference is that XCOPY can copy a file open in shared write mode
and VFP COPY command can't. For example, if your classlib is open in
VFP, the COPY command will fail to copy it, but XCOPY will. It waits a
tad to look for changes, but it does it.


Re: Which is faster - COPY FILE or XXCopy? by tom

tom
Tue Sep 25 00:29:30 PDT 2007

Hi,

you may also want to have a look at the robocopy command , you can get it
free on microsoft or from a resource package.
It has MANY nice feature, including retries, mirror mode,log file,...

HTH
Tom

"Steve Meyerson" <stevemeyerson@cox.net> schrieb im Newsbeitrag
news:esggf3dfqrml924e60q72aqueu91oorvon@4ax.com...
> I'm rewriting a routine in VFP8 (XP Pro) to back up about 4,000 small
> files, averaqing about 5k each, from about 5 folders from the hard
> disk to a USB mini hard drive. I'm considering two approaches:
>
> 1. Using XXCopy.exe with the RUN command or ShellExedute.
>
> 2. Using only the built-in COPY FILE command.
>
> I have a feeling XXCopy would be faster, but I haven't tested it.
> Could someone confirm that? Or is it an "it depends" situation in
> which case I'll go ahead and test it.
>
> Thanks for any help.
>
> Steve M.



Re: Which is faster - COPY FILE or XXCopy? by Man-wai

Man-wai
Tue Sep 25 03:04:56 PDT 2007

> 1. Using XXCopy.exe with the RUN command or ShellExedute.
> 2. Using only the built-in COPY FILE command.
> I have a feeling XXCopy would be faster, but I haven't tested it.

XXCOPY and XCOPY should be faster.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.7
^ ^ 18:04:01 up 1 day 21:19 1 user load average: 2.59 2.65 2.12
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Which is faster - COPY FILE or XXCopy? by Steve

Steve
Tue Sep 25 07:31:57 PDT 2007

On Tue, 25 Sep 2007 18:04:56 +0800, Man-wai Chang ToDie
<toylet.toylet@gmail.com> wrote:

>> 1. Using XXCopy.exe with the RUN command or ShellExedute.
>> 2. Using only the built-in COPY FILE command.
>> I have a feeling XXCopy would be faster, but I haven't tested it.
>
>XXCOPY and XCOPY should be faster.

...and you say this because... ??


Re: Which is faster - COPY FILE or XXCopy? by Steve

Steve
Tue Sep 25 07:37:31 PDT 2007

On Mon, 24 Sep 2007 19:35:16 -0700, "bork" <bork@bork.com> wrote:

>VFP's copy file command will max out bandwidth on a 100mb network with
>minimal cpu usage. What is the bandwidth into your USB drive? IIRC, they
>tend to be relatively slow, and you may find that the bottleneck is the
>drive itself, not the software doing the file copy.

In this case, the USB drive is connected directly to the USB port of
the computer containing the data to be backed up. But I do have a
similar case where the data is downloaded to a laptop thru a wired
LAN. And who knows what the "next" case may be, so your point on CPU
usage and bandwidth is well taken. Thanks.
Steve

>
>I would recommend you try it both ways and see - that is the only way to
>tell for sure. My first guess is that you won't notice any speed
>differences. You might notice differences in cpu consumption.
>
>
>"Steve Meyerson" <stevemeyerson@cox.net> wrote in message
>news:esggf3dfqrml924e60q72aqueu91oorvon@4ax.com...
>> I'm rewriting a routine in VFP8 (XP Pro) to back up about 4,000 small
>> files, averaqing about 5k each, from about 5 folders from the hard
>> disk to a USB mini hard drive. I'm considering two approaches:
>>
>> 1. Using XXCopy.exe with the RUN command or ShellExedute.
>>
>> 2. Using only the built-in COPY FILE command.
>>
>> I have a feeling XXCopy would be faster, but I haven't tested it.
>> Could someone confirm that? Or is it an "it depends" situation in
>> which case I'll go ahead and test it.
>>
>> Thanks for any help.
>>
>> Steve M.
>


Re: Which is faster - COPY FILE or XXCopy? by Steve

Steve
Tue Sep 25 07:47:08 PDT 2007

On Mon, 24 Sep 2007 19:55:36 -0700, Tom Green <bigband@preville.qc.ca>
wrote:
>
>One difference is that XCOPY can copy a file open in shared write mode
>and VFP COPY command can't. For example, if your classlib is open in
>VFP, the COPY command will fail to copy it, but XCOPY will. It waits a
>tad to look for changes, but it does it.

Good point. However, in my particular case the backup routine is a
separate program program, so none of the data or program's files will
be open (I check for that in the backup program).
Steve

Re: Which is faster - COPY FILE or XXCopy? by Cy

Cy
Tue Sep 25 16:34:16 PDT 2007

Because he just makes things up without actually having tried them. I
suspect there would be little or no difference, but then I have not used
either one for some time as I use a DLL I built a LONG time ago (even lost
the source for it) that automates explorer and provides a progress bar
during the copy. Of course under Vista it can be much slower than either
xcopy or VFP's built in copy, but that's a Vista bug.

--
Cy Welch
Senior Programmer/Analyst
MetSYS Inc.
http://www.metsysinc.com

"Steve Meyerson" <stevemeyerson@cox.net> wrote in message
news:ht6if39f59b1hbb8829ef51ck2acrp0mrn@4ax.com...
> On Tue, 25 Sep 2007 18:04:56 +0800, Man-wai Chang ToDie
> <toylet.toylet@gmail.com> wrote:
>
>>> 1. Using XXCopy.exe with the RUN command or ShellExedute.
>>> 2. Using only the built-in COPY FILE command.
>>> I have a feeling XXCopy would be faster, but I haven't tested it.
>>
>>XXCOPY and XCOPY should be faster.
>
> ...and you say this because... ??
>

Re: Which is faster - COPY FILE or XXCopy? by Man-wai

Man-wai
Tue Sep 25 19:16:51 PDT 2007

>> XXCOPY and XCOPY should be faster.
> ...and you say this because... ??

XCOPY uses a more efficient way of copying files. I forgot how it did
it, something to do with the FAT access I barely remembered from my DOS
days... Oh... maybe NTFS wouldn't allow that kind of access now. In the
latter case, I would apologize.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 10:14:01 up 13:04 0 users load average: 0.31 0.10 0.02
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Which is faster - COPY FILE or XXCopy? by bork

bork
Tue Sep 25 19:36:44 PDT 2007


>>VFP's copy file command will max out bandwidth on a 100mb network with
>>minimal cpu usage. What is the bandwidth into your USB drive? IIRC, they
>>tend to be relatively slow, and you may find that the bottleneck is the
>>drive itself, not the software doing the file copy.
>
> In this case, the USB drive is connected directly to the USB port of
> the computer containing the data to be backed up. But I do have a
> similar case where the data is downloaded to a laptop thru a wired
> LAN. And who knows what the "next" case may be, so your point on CPU
> usage and bandwidth is well taken. Thanks.
> Steve
>

I might also comment that cpu usage is very much dependant on not only the
efficiency of the copy algorighms, but on the nic and drivers. A phat 3com
nic will exhibit low cpu, where an el-cheapo offbrand nic might have high
cpu utilisation. For that reason, a solution that minimizes cpu usage might
be preferred, *if* cpu usage during the copy is an issue.



Re: Which is faster - COPY FILE or XXCopy? by Man-wai

Man-wai
Tue Sep 25 21:11:29 PDT 2007

Cy Welch wrote:
> Because he just makes things up without actually having tried them. I
> suspect there would be little or no difference, but then I have not used
> either one for some time as I use a DLL I built a LONG time ago (even
> lost the source for it) that automates explorer and provides a progress
> bar during the copy. Of course under Vista it can be much slower than
> either xcopy or VFP's built in copy, but that's a Vista bug.
>

if there is/was a reason for XCOPY being no faster than COPY, it's the
cache, aka SMARTDRV in DOS days.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 12:10:01 up 15:00 0 users load average: 0.01 0.04 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Which is faster - COPY FILE or XXCopy? by Man-wai

Man-wai
Tue Sep 25 21:12:34 PDT 2007

Man-wai Chang ToDie wrote:
>>> XXCOPY and XCOPY should be faster.
>> ...and you say this because... ??
>
> XCOPY uses a more efficient way of copying files. I forgot how it did
> it, something to do with the FAT access I barely remembered from my DOS
> days... Oh... maybe NTFS wouldn't allow that kind of access now. In the
> latter case, I would apologize.
>
I remembered, it's the sequential read on the FAT for all the files
needed to be copied, thus reducing disk head movement...

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 12:11:01 up 15:01 0 users load average: 0.00 0.03 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Which is faster - COPY FILE or XXCopy? by Man-wai

Man-wai
Tue Sep 25 21:32:34 PDT 2007

>
> if there is/was a reason for XCOPY being no faster than COPY, it's the
> cache, aka SMARTDRV in DOS days.
>

But still, there is an issue with number of drive head movement.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 12:32:01 up 15:22 0 users load average: 0.00 0.01 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Which is faster - COPY FILE or XXCopy? by Cy

Cy
Tue Sep 25 23:00:31 PDT 2007

That would actually only apply on a sequentially defragmented drive. And
would certainly no longer apply in the day of NTFS since there IS no FAT. I
do however recall that in that you are correct that xcopy would read as many
files as would fit in memory before writing out what was in memory in
cycles. I would guess it could be a little faster IF you didn't have any
cache running as the primary purpose for those is/was to eliminate exactly
that problem. Along with the fact that many caches did lazy writes and had
access to much more memory than xcopy did (most ran in extended memory which
xcopy couldn't do) pretty much did away with any advantage for xcopy.

The cache I use (hyperdisk IIRC) was very good at that. Far better than
MS's cache, and it made more reads and writes seem faster than the drive.
That was also in the day of MUCH slower drives than we have today. My slow
laptop drive (5400 RPM) is many many times faster than the fastest drives
from back then.

--
Cy Welch
Senior Programmer/Analyst
MetSYS Inc.
http://www.metsysinc.com

"Man-wai Chang ToDie" <toylet.toylet@gmail.com> wrote in message
news:eBmw1N$$HHA.536@TK2MSFTNGP06.phx.gbl...
> Man-wai Chang ToDie wrote:
>>>> XXCOPY and XCOPY should be faster.
>>> ...and you say this because... ??
>>
>> XCOPY uses a more efficient way of copying files. I forgot how it did it,
>> something to do with the FAT access I barely remembered from my DOS
>> days... Oh... maybe NTFS wouldn't allow that kind of access now. In the
>> latter case, I would apologize.
>>
> I remembered, it's the sequential read on the FAT for all the files needed
> to be copied, thus reducing disk head movement...
>
> --
> @~@ Might, Courage, Vision, SINCERITY.
> / v \ Simplicity is Beauty! May the Force and Farce be with you!
> /( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
> ^ ^ 12:11:01 up 15:01 0 users load average: 0.00 0.03 0.00
> news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk


Re: Which is faster - COPY FILE or XXCopy? by Man-wai

Man-wai
Wed Sep 26 00:40:50 PDT 2007

> That would actually only apply on a sequentially defragmented drive.
> And would certainly no longer apply in the day of NTFS since there IS no
> FAT. I do however recall that in that you are correct that xcopy would

I believe the head movement issue still applies, just that harddisk a
lot faster than floppy drives. If you had compiled COBOL programs on a
5.25" drive using DOS 3.3, you would understand the speed advantage of
XCOPY.EXE.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 15:39:01 up 18:29 0 users load average: 0.08 0.05 0.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Which is faster - COPY FILE or XXCopy? by Man-wai

Man-wai
Wed Sep 26 02:31:48 PDT 2007

> I believe the head movement issue still applies, just that harddisk a
> lot faster than floppy drives. If you had compiled COBOL programs on a
> 5.25" drive using DOS 3.3, you would understand the speed advantage of
^ floppy diskette
> XCOPY.EXE.
>


--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 17:31:01 up 20:21 0 users load average: 0.20 0.11 0.11
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Which is faster - COPY FILE or XXCopy? by Jeff

Jeff
Wed Sep 26 06:55:22 PDT 2007

I use XXCOPY although I don't call it from VFP.

XXCOPY has the ability to create a log file which includes statistics.

You could create the same stats in VFP and then compare them.

My hunch is that XXCOPY is faster.

Most file copy operations are constrained by the OS and its ability to find
files.

I have some folders with 25,000 files totaling less than 1 Gb which take
longer to XXCOPY than other folders with 7 Gb of data in 1,000 files. It
seems that XP and Win 2003 really don't like folders with large numbers of
files.

Jeff
"Steve Meyerson" <stevemeyerson@cox.net> wrote in message
news:esggf3dfqrml924e60q72aqueu91oorvon@4ax.com...
> I'm rewriting a routine in VFP8 (XP Pro) to back up about 4,000 small
> files, averaqing about 5k each, from about 5 folders from the hard
> disk to a USB mini hard drive. I'm considering two approaches:
>
> 1. Using XXCopy.exe with the RUN command or ShellExedute.
>
> 2. Using only the built-in COPY FILE command.
>
> I have a feeling XXCopy would be faster, but I haven't tested it.
> Could someone confirm that? Or is it an "it depends" situation in
> which case I'll go ahead and test it.
>
> Thanks for any help.
>
> Steve M.



Re: Which is faster - COPY FILE or XXCopy? by Man-wai

Man-wai
Wed Sep 26 07:05:56 PDT 2007

> I have some folders with 25,000 files totaling less than 1 Gb which take
> longer to XXCOPY than other folders with 7 Gb of data in 1,000 files. It
> seems that XP and Win 2003 really don't like folders with large numbers of
> files.

Just like the root directory of DOS? :)

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 22:05:01 up 1 day 55 min 0 users load average: 0.01 0.08 0.07
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Which is faster - COPY FILE or XXCopy? by Steve

Steve
Wed Sep 26 07:14:31 PDT 2007

On Tue, 25 Sep 2007 19:36:44 -0700, "bork" <bork@bork.com> wrote:

>
>>>VFP's copy file command will max out bandwidth on a 100mb network with
>>>minimal cpu usage. What is the bandwidth into your USB drive? IIRC, they
>>>tend to be relatively slow, and you may find that the bottleneck is the
>>>drive itself, not the software doing the file copy.
>>
>> In this case, the USB drive is connected directly to the USB port of
>> the computer containing the data to be backed up. But I do have a
>> similar case where the data is downloaded to a laptop thru a wired
>> LAN. And who knows what the "next" case may be, so your point on CPU
>> usage and bandwidth is well taken. Thanks.
>> Steve
>>
>
>I might also comment that cpu usage is very much dependant on not only the
>efficiency of the copy algorighms, but on the nic and drivers. A phat 3com
>nic will exhibit low cpu, where an el-cheapo offbrand nic might have high
>cpu utilisation. For that reason, a solution that minimizes cpu usage might
>be preferred, *if* cpu usage during the copy is an issue.
>

Thanks.

Re: Which is faster - COPY FILE or XXCopy? by Jeff

Jeff
Wed Sep 26 07:57:06 PDT 2007


"Man-wai Chang ToDie" <toylet.toylet@gmail.com> wrote in message
news:%23NMNaZEAIHA.4836@TK2MSFTNGP06.phx.gbl...
>> I have some folders with 25,000 files totaling less than 1 Gb which take
>> longer to XXCOPY than other folders with 7 Gb of data in 1,000 files. It
>> seems that XP and Win 2003 really don't like folders with large numbers
>> of files.
>
> Just like the root directory of DOS? :)
>

Yes, except the root directory of DOS was a documented limitation that
everyone knew about. This strangeness of windows slowing down when dealing
with folder that have large numbers of files it an unwritten rule. After
about 2-3K files, the ability to open the folder gets progressively slower.

In my XXCOPY of the folders with 25k files you can see the files (all under
10K) take about .5 seconds each to access the directory information.




Re: Which is faster - COPY FILE or XXCopy? by Steve

Steve
Wed Sep 26 07:59:14 PDT 2007

Thanks, everyone, for your help.

I may be able to do the backup totally outside of VFP if I use XXCopy,
but I would need to come up with a way to name each folder so the date
and type of backup (full or incremental) is included in the date for
selective restore purposes - i.e. I need to RTFM :-(

My real challenge is to make it nearly a one-click process due to my
computer-illerate-and-proud-of-it user.

Steve



On Mon, 24 Sep 2007 23:31:33 GMT, Steve Meyerson
<stevemeyerson@cox.net> wrote:

>I'm rewriting a routine in VFP8 (XP Pro) to back up about 4,000 small
>files, averaqing about 5k each, from about 5 folders from the hard
>disk to a USB mini hard drive. I'm considering two approaches:
>
>1. Using XXCopy.exe with the RUN command or ShellExedute.
>
>2. Using only the built-in COPY FILE command.
>
>I have a feeling XXCopy would be faster, but I haven't tested it.
>Could someone confirm that? Or is it an "it depends" situation in
>which case I'll go ahead and test it.
>
>Thanks for any help.
>
>Steve M.


Re: Which is faster - COPY FILE or XXCopy? by Steve

Steve
Wed Sep 26 08:11:30 PDT 2007

On Wed, 26 Sep 2007 14:59:14 GMT, Steve Meyerson
<stevemeyerson@cox.net> wrote:

>Thanks, everyone, for your help.
>
>I may be able to do the backup totally outside of VFP if I use XXCopy,
>but I would need to come up with a way to name each folder so the date
>and type of backup (full or incremental) is included in the date for
>selective restore purposes - i.e. I need to RTFM :-(
>
>My real challenge is to make it nearly a one-click process due to my
>computer-illerate-and-proud-of-it user.
>
>Steve
>

"illerate" - That's illiterate without the IT :)

Re: Which is faster - COPY FILE or XXCopy? by Jeff

Jeff
Wed Sep 26 09:21:25 PDT 2007

> I may be able to do the backup totally outside of VFP if I use XXCopy,
> but I would need to come up with a way to name each folder so the date
> and type of backup (full or incremental) is included in the date for
> selective restore purposes - i.e. I need to RTFM :-(


XXCOPY does this. It is the reason that I chose it as a tool

Here is a sample from my batch file

xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C /oA/$YYYYMMDD$.TXT

This copies the checks folder from drive K to a folder on drive G whose name
(today) would be

G:\2007-09-26\CHECKS

The final switch /oA/$YYYYMMDD$.TXT

Appends to a file called (today) 20070926.TXT which contains the results
from the operation. They look like this:

===============================================================================
XXCOPY ver 2.92.6 2007-09-18 18:18:20 Windows Ver 5.1.2600
Command Line = xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C
/oA/$YYYYMMDD$.TXT
-------------------------------------------------------------------------------
Switch Parameters
/AXH /AXS /B0 /C /CA /CB0 /CCY /CK /CR3 /D0 /DL0 /E0 /EC0 /ED0 /ER0 /F0
/FM0
/FF0 /FL /FT0 /FW /H0 /I /IN* /K0 /L0 /N0 /NP0 /NX0 /NI0 /NW /NC0
/oAe:\20070918.TXT /oD1 /oE0 /oF1 /oI0 /oP0 /oS0 /oX0 /P0 /PB0 /PBH /PC0
/PD0
/PN /Po /PZ0 /Q0 /QF0 /QB0 /QS0 /R0 /S /SP0 /SG0 /SX0 SZ:- /T0 /TR00 /TS0
/TD0 /TTA0 /TCA0 /TCC0 /TCW /TM0 /U0 /V0 /W0 /WD /Z0 /ZE0 /ZS0 /ZX0
-------------------------------------------------------------------------------
Source base directory = "K:\CHECKS\"
Destination directory = "G:\2007-09-18\CHECKS\"
File name template = "*"
Directories processed = 4,448
Total data in bytes = 9,027,685,968
Elapsed time in sec. = 18,360
Action speed (MB/min) = 29.5
Files copied = 303,322
Directories created = 4,443
Log File Appended = e:\20070918.TXT
Exit code = 0 (No error, Successful operation)

As you can see, you have the total data in bytes and the elapsed time in
seconds.

Jeff

"Steve Meyerson" <stevemeyerson@cox.net> wrote in message
news:9mqkf3tgj7jn7doefou8i7kulcv73kelgn@4ax.com...
> Thanks, everyone, for your help.
>
>
> My real challenge is to make it nearly a one-click process due to my
> computer-illerate-and-proud-of-it user.
>
> Steve
>
>
>
> On Mon, 24 Sep 2007 23:31:33 GMT, Steve Meyerson
> <stevemeyerson@cox.net> wrote:
>
>>I'm rewriting a routine in VFP8 (XP Pro) to back up about 4,000 small
>>files, averaqing about 5k each, from about 5 folders from the hard
>>disk to a USB mini hard drive. I'm considering two approaches:
>>
>>1. Using XXCopy.exe with the RUN command or ShellExedute.
>>
>>2. Using only the built-in COPY FILE command.
>>
>>I have a feeling XXCopy would be faster, but I haven't tested it.
>>Could someone confirm that? Or is it an "it depends" situation in
>>which case I'll go ahead and test it.
>>
>>Thanks for any help.
>>
>>Steve M.
>



Re: Which is faster - COPY FILE or XXCopy? by Steve

Steve
Wed Sep 26 13:48:56 PDT 2007

Thanks a lot, Jeff. Your example will help me tremendously with the
doc.

Your example took about 5 hrs. At 29.5 MB/min, my "measly" 100MB (max)
should take 3 or 4 minutes, or less, which is great.

Steve



On Wed, 26 Sep 2007 12:21:25 -0400, "Jeff Grippe" <jeff@door7.com>
wrote:

>> I may be able to do the backup totally outside of VFP if I use XXCopy,
>> but I would need to come up with a way to name each folder so the date
>> and type of backup (full or incremental) is included in the date for
>> selective restore purposes - i.e. I need to RTFM :-(
>
>
>XXCOPY does this. It is the reason that I chose it as a tool
>
>Here is a sample from my batch file
>
>xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C /oA/$YYYYMMDD$.TXT
>
>This copies the checks folder from drive K to a folder on drive G whose name
>(today) would be
>
>G:\2007-09-26\CHECKS
>
>The final switch /oA/$YYYYMMDD$.TXT
>
>Appends to a file called (today) 20070926.TXT which contains the results
>from the operation. They look like this:
>
>===============================================================================
>XXCOPY ver 2.92.6 2007-09-18 18:18:20 Windows Ver 5.1.2600
> Command Line = xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C
>/oA/$YYYYMMDD$.TXT
>-------------------------------------------------------------------------------
>Switch Parameters
> /AXH /AXS /B0 /C /CA /CB0 /CCY /CK /CR3 /D0 /DL0 /E0 /EC0 /ED0 /ER0 /F0
>/FM0
> /FF0 /FL /FT0 /FW /H0 /I /IN* /K0 /L0 /N0 /NP0 /NX0 /NI0 /NW /NC0
> /oAe:\20070918.TXT /oD1 /oE0 /oF1 /oI0 /oP0 /oS0 /oX0 /P0 /PB0 /PBH /PC0
>/PD0
> /PN /Po /PZ0 /Q0 /QF0 /QB0 /QS0 /R0 /S /SP0 /SG0 /SX0 SZ:- /T0 /TR00 /TS0
> /TD0 /TTA0 /TCA0 /TCC0 /TCW /TM0 /U0 /V0 /W0 /WD /Z0 /ZE0 /ZS0 /ZX0
>-------------------------------------------------------------------------------
> Source base directory = "K:\CHECKS\"
> Destination directory = "G:\2007-09-18\CHECKS\"
> File name template = "*"
> Directories processed = 4,448
> Total data in bytes = 9,027,685,968
> Elapsed time in sec. = 18,360
> Action speed (MB/min) = 29.5
> Files copied = 303,322
> Directories created = 4,443
> Log File Appended = e:\20070918.TXT
> Exit code = 0 (No error, Successful operation)
>
>As you can see, you have the total data in bytes and the elapsed time in
>seconds.
>
>Jeff
>


Re: Which is faster - COPY FILE or XXCopy? by TonySper

TonySper
Wed Sep 26 16:54:22 PDT 2007

When using the copy in VFP, how do you copy all the subfolders??? Is there a
command in copy file to copy all the subfolders??? I have used XXCOPY for
personal use as if you use it commercial you need to purchase a license for
$40.00 for 1 or 2 users. After that it gets expensive. You cannot distribute
XXCOPY or include it in your applications.
Tony

"Steve Meyerson" <stevemeyerson@cox.net> wrote in message
news:aoglf392tdr9pgvgdgmpf3d9jm2emtrl5k@4ax.com...
> Thanks a lot, Jeff. Your example will help me tremendously with the
> doc.
>
> Your example took about 5 hrs. At 29.5 MB/min, my "measly" 100MB (max)
> should take 3 or 4 minutes, or less, which is great.
>
> Steve
>
>
>
> On Wed, 26 Sep 2007 12:21:25 -0400, "Jeff Grippe" <jeff@door7.com>
> wrote:
>
>>> I may be able to do the backup totally outside of VFP if I use XXCopy,
>>> but I would need to come up with a way to name each folder so the date
>>> and type of backup (full or incremental) is included in the date for
>>> selective restore purposes - i.e. I need to RTFM :-(
>>
>>
>>XXCOPY does this. It is the reason that I chose it as a tool
>>
>>Here is a sample from my batch file
>>
>>xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C /oA/$YYYYMMDD$.TXT
>>
>>This copies the checks folder from drive K to a folder on drive G whose
>>name
>>(today) would be
>>
>>G:\2007-09-26\CHECKS
>>
>>The final switch /oA/$YYYYMMDD$.TXT
>>
>>Appends to a file called (today) 20070926.TXT which contains the results
>>from the operation. They look like this:
>>
>>===============================================================================
>>XXCOPY ver 2.92.6 2007-09-18 18:18:20 Windows Ver 5.1.2600
>> Command Line = xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C
>>/oA/$YYYYMMDD$.TXT
>>-------------------------------------------------------------------------------
>>Switch Parameters
>> /AXH /AXS /B0 /C /CA /CB0 /CCY /CK /CR3 /D0 /DL0 /E0 /EC0 /ED0 /ER0 /F0
>>/FM0
>> /FF0 /FL /FT0 /FW /H0 /I /IN* /K0 /L0 /N0 /NP0 /NX0 /NI0 /NW /NC0
>> /oAe:\20070918.TXT /oD1 /oE0 /oF1 /oI0 /oP0 /oS0 /oX0 /P0 /PB0 /PBH /PC0
>>/PD0
>> /PN /Po /PZ0 /Q0 /QF0 /QB0 /QS0 /R0 /S /SP0 /SG0 /SX0 SZ:- /T0 /TR00 /TS0
>> /TD0 /TTA0 /TCA0 /TCC0 /TCW /TM0 /U0 /V0 /W0 /WD /Z0 /ZE0 /ZS0 /ZX0
>>-------------------------------------------------------------------------------
>> Source base directory = "K:\CHECKS\"
>> Destination directory = "G:\2007-09-18\CHECKS\"
>> File name template = "*"
>> Directories processed = 4,448
>> Total data in bytes = 9,027,685,968
>> Elapsed time in sec. = 18,360
>> Action speed (MB/min) = 29.5
>> Files copied = 303,322
>> Directories created = 4,443
>> Log File Appended = e:\20070918.TXT
>> Exit code = 0 (No error, Successful operation)
>>
>>As you can see, you have the total data in bytes and the elapsed time in
>>seconds.
>>
>>Jeff
>>
>



Re: Which is faster - COPY FILE or XXCopy? by Fred

Fred
Wed Sep 26 18:30:37 PDT 2007

You have to go through the directory structure yourself in VFP, there's no
"built-in" way of doing it. You should be able to search for "recurse
directory" in forums like the UT and find something.

--
Fred
Microsoft Visual FoxPro MVP


"TonySper" <tsperduti@nospambellsouth.net> wrote in message
news:%23iVGUiJAIHA.4656@TK2MSFTNGP04.phx.gbl...
> When using the copy in VFP, how do you copy all the subfolders??? Is there
> a command in copy file to copy all the subfolders??? I have used XXCOPY
> for personal use as if you use it commercial you need to purchase a
> license for $40.00 for 1 or 2 users. After that it gets expensive. You
> cannot distribute XXCOPY or include it in your applications.
> Tony
>
> "Steve Meyerson" <stevemeyerson@cox.net> wrote in message
> news:aoglf392tdr9pgvgdgmpf3d9jm2emtrl5k@4ax.com...
>> Thanks a lot, Jeff. Your example will help me tremendously with the
>> doc.
>>
>> Your example took about 5 hrs. At 29.5 MB/min, my "measly" 100MB (max)
>> should take 3 or 4 minutes, or less, which is great.
>>
>> Steve
>>
>>
>>
>> On Wed, 26 Sep 2007 12:21:25 -0400, "Jeff Grippe" <jeff@door7.com>
>> wrote:
>>
>>>> I may be able to do the backup totally outside of VFP if I use XXCopy,
>>>> but I would need to come up with a way to name each folder so the date
>>>> and type of backup (full or incremental) is included in the date for
>>>> selective restore purposes - i.e. I need to RTFM :-(
>>>
>>>
>>>XXCOPY does this. It is the reason that I chose it as a tool
>>>
>>>Here is a sample from my batch file
>>>
>>>xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C /oA/$YYYYMMDD$.TXT
>>>
>>>This copies the checks folder from drive K to a folder on drive G whose
>>>name
>>>(today) would be
>>>
>>>G:\2007-09-26\CHECKS
>>>
>>>The final switch /oA/$YYYYMMDD$.TXT
>>>
>>>Appends to a file called (today) 20070926.TXT which contains the results
>>>from the operation. They look like this:
>>>
>>>===============================================================================
>>>XXCOPY ver 2.92.6 2007-09-18 18:18:20 Windows Ver 5.1.2600
>>> Command Line = xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C
>>>/oA/$YYYYMMDD$.TXT
>>>-------------------------------------------------------------------------------
>>>Switch Parameters
>>> /AXH /AXS /B0 /C /CA /CB0 /CCY /CK /CR3 /D0 /DL0 /E0 /EC0 /ED0 /ER0 /F0
>>>/FM0
>>> /FF0 /FL /FT0 /FW /H0 /I /IN* /K0 /L0 /N0 /NP0 /NX0 /NI0 /NW /NC0
>>> /oAe:\20070918.TXT /oD1 /oE0 /oF1 /oI0 /oP0 /oS0 /oX0 /P0 /PB0 /PBH /PC0
>>>/PD0
>>> /PN /Po /PZ0 /Q0 /QF0 /QB0 /QS0 /R0 /S /SP0 /SG0 /SX0 SZ:- /T0 /TR00
>>> /TS0
>>> /TD0 /TTA0 /TCA0 /TCC0 /TCW /TM0 /U0 /V0 /W0 /WD /Z0 /ZE0 /ZS0 /ZX0
>>>-------------------------------------------------------------------------------
>>> Source base directory = "K:\CHECKS\"
>>> Destination directory = "G:\2007-09-18\CHECKS\"
>>> File name template = "*"
>>> Directories processed = 4,448
>>> Total data in bytes = 9,027,685,968
>>> Elapsed time in sec. = 18,360
>>> Action speed (MB/min) = 29.5
>>> Files copied = 303,322
>>> Directories created = 4,443
>>> Log File Appended = e:\20070918.TXT
>>> Exit code = 0 (No error, Successful operation)
>>>
>>>As you can see, you have the total data in bytes and the elapsed time in
>>>seconds.
>>>
>>>Jeff
>>>
>>
>
>



Re: Which is faster - COPY FILE or XXCopy? by Aaron

Aaron
Thu Sep 27 02:51:59 PDT 2007

An alternative is to use the My namespace (from Sedna). This example (from
the help file) shows how to copy an entire folder structure:

local My as My
My = newobject('My', 'My.vcx')
lcFolder = My.Computer.FileSystem.SpecialDirectories.MyDocuments +
'\TestFolder'
llCopied = My.Computer.FileSystem.CopyDirectory(lcFolder,
'C:\MyDocumentsCopy')

I have tried it - it works - and it seems to perform well.
Aaron

"Fred Taylor" <ftaylor@mvps.org!REMOVE> skrev i meddelandet
news:OIPjxWKAIHA.2268@TK2MSFTNGP02.phx.gbl...
> You have to go through the directory structure yourself in VFP, there's no
> "built-in" way of doing it. You should be able to search for "recurse
> directory" in forums like the UT and find something.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "TonySper" <tsperduti@nospambellsouth.net> wrote in message
> news:%23iVGUiJAIHA.4656@TK2MSFTNGP04.phx.gbl...
>> When using the copy in VFP, how do you copy all the subfolders??? Is
>> there a command in copy file to copy all the subfolders??? I have used
>> XXCOPY for personal use as if you use it commercial you need to purchase
>> a license for $40.00 for 1 or 2 users. After that it gets expensive. You
>> cannot distribute XXCOPY or include it in your applications.
>> Tony
>>
>> "Steve Meyerson" <stevemeyerson@cox.net> wrote in message
>> news:aoglf392tdr9pgvgdgmpf3d9jm2emtrl5k@4ax.com...
>>> Thanks a lot, Jeff. Your example will help me tremendously with the
>>> doc.
>>>
>>> Your example took about 5 hrs. At 29.5 MB/min, my "measly" 100MB (max)
>>> should take 3 or 4 minutes, or less, which is great.
>>>
>>> Steve
>>>
>>>
>>>
>>> On Wed, 26 Sep 2007 12:21:25 -0400, "Jeff Grippe" <jeff@door7.com>
>>> wrote:
>>>
>>>>> I may be able to do the backup totally outside of VFP if I use XXCopy,
>>>>> but I would need to come up with a way to name each folder so the date
>>>>> and type of backup (full or incremental) is included in the date for
>>>>> selective restore purposes - i.e. I need to RTFM :-(
>>>>
>>>>
>>>>XXCOPY does this. It is the reason that I chose it as a tool
>>>>
>>>>Here is a sample from my batch file
>>>>
>>>>xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C /oA/$YYYYMMDD$.TXT
>>>>
>>>>This copies the checks folder from drive K to a folder on drive G whose
>>>>name
>>>>(today) would be
>>>>
>>>>G:\2007-09-26\CHECKS
>>>>
>>>>The final switch /oA/$YYYYMMDD$.TXT
>>>>
>>>>Appends to a file called (today) 20070926.TXT which contains the results
>>>>from the operation. They look like this:
>>>>
>>>>===============================================================================
>>>>XXCOPY ver 2.92.6 2007-09-18 18:18:20 Windows Ver 5.1.2600
>>>> Command Line = xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C
>>>>/oA/$YYYYMMDD$.TXT
>>>>-------------------------------------------------------------------------------
>>>>Switch Parameters
>>>> /AXH /AXS /B0 /C /CA /CB0 /CCY /CK /CR3 /D0 /DL0 /E0 /EC0 /ED0 /ER0 /F0
>>>>/FM0
>>>> /FF0 /FL /FT0 /FW /H0 /I /IN* /K0 /L0 /N0 /NP0 /NX0 /NI0 /NW /NC0
>>>> /oAe:\20070918.TXT /oD1 /oE0 /oF1 /oI0 /oP0 /oS0 /oX0 /P0 /PB0 /PBH
>>>> /PC0
>>>>/PD0
>>>> /PN /Po /PZ0 /Q0 /QF0 /QB0 /QS0 /R0 /S /SP0 /SG0 /SX0 SZ:- /T0 /TR00
>>>> /TS0
>>>> /TD0 /TTA0 /TCA0 /TCC0 /TCW /TM0 /U0 /V0 /W0 /WD /Z0 /ZE0 /ZS0 /ZX0
>>>>-------------------------------------------------------------------------------
>>>> Source base directory = "K:\CHECKS\"
>>>> Destination directory = "G:\2007-09-18\CHECKS\"
>>>> File name template = "*"
>>>> Directories processed = 4,448
>>>> Total data in bytes = 9,027,685,968
>>>> Elapsed time in sec. = 18,360
>>>> Action speed (MB/min) = 29.5
>>>> Files copied = 303,322
>>>> Directories created = 4,443
>>>> Log File Appended = e:\20070918.TXT
>>>> Exit code = 0 (No error, Successful operation)
>>>>
>>>>As you can see, you have the total data in bytes and the elapsed time in
>>>>seconds.
>>>>
>>>>Jeff
>>>>
>>>
>>
>>
>
>



Re: Which is faster - COPY FILE or XXCopy? by Jeff

Jeff
Thu Sep 27 06:09:33 PDT 2007

The speed is really much more influenced by the number of files than the
amount of data. For Example:

Source base directory = "K:\PRG\"
Destination directory = "G:\2007-06-22\PRG\"
Total data in bytes = 9,810,070,488
Elapsed time in sec. = 2,048
Action speed (MB/min) = 287.4
Files copied = 22,724

vs

Source base directory = "K:\CHECKS\"
Destination directory = "G:\2007-06-22\CHECKS\"
Total data in bytes = 8,516,432,211
Elapsed time in sec. = 16,469
Action speed (MB/min) = 31.03
Files copied = 284,559

The nearly 10 Gb from K:\PRG\ processed at 287.4 MB/min while the 8.5 Gb
from K:\CHECKS\ processed at 31.03 MB/min.

The difference is the number of files. 22,274 in PRG vs 284,559 in CHECKS

When I first wrote the application that stores images in CHECKS, I had
everybody dumping the files into CHECKS. After the first day, when there
were about 4,000 files, it started taking 10-15 seconds to add each new
image. I changed the app so that images are placed in a directory structure
that looks like:

K:\CHECKS\<YEAR>\<USER>\<MONTH and DAY>\file

This keep the number of files in any folder small and the performance is
fine.

Jeff

"Steve Meyerson" <stevemeyerson@cox.net> wrote in message
news:aoglf392tdr9pgvgdgmpf3d9jm2emtrl5k@4ax.com...
> Thanks a lot, Jeff. Your example will help me tremendously with the
> doc.
>
> Your example took about 5 hrs. At 29.5 MB/min, my "measly" 100MB (max)
> should take 3 or 4 minutes, or less, which is great.
>
> Steve
>
>
>
> On Wed, 26 Sep 2007 12:21:25 -0400, "Jeff Grippe" <jeff@door7.com>
> wrote:
>
>>> I may be able to do the backup totally outside of VFP if I use XXCopy,
>>> but I would need to come up with a way to name each folder so the date
>>> and type of backup (full or incremental) is included in the date for
>>> selective restore purposes - i.e. I need to RTFM :-(
>>
>>
>>XXCOPY does this. It is the reason that I chose it as a tool
>>
>>Here is a sample from my batch file
>>
>>xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C /oA/$YYYYMMDD$.TXT
>>
>>This copies the checks folder from drive K to a folder on drive G whose
>>name
>>(today) would be
>>
>>G:\2007-09-26\CHECKS
>>
>>The final switch /oA/$YYYYMMDD$.TXT
>>
>>Appends to a file called (today) 20070926.TXT which contains the results
>>from the operation. They look like this:
>>
>>===============================================================================
>>XXCOPY ver 2.92.6 2007-09-18 18:18:20 Windows Ver 5.1.2600
>> Command Line = xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C
>>/oA/$YYYYMMDD$.TXT
>>-------------------------------------------------------------------------------
>>Switch Parameters
>> /AXH /AXS /B0 /C /CA /CB0 /CCY /CK /CR3 /D0 /DL0 /E0 /EC0 /ED0 /ER0 /F0
>>/FM0
>> /FF0 /FL /FT0 /FW /H0 /I /IN* /K0 /L0 /N0 /NP0 /NX0 /NI0 /NW /NC0
>> /oAe:\20070918.TXT /oD1 /oE0 /oF1 /oI0 /oP0 /oS0 /oX0 /P0 /PB0 /PBH /PC0
>>/PD0
>> /PN /Po /PZ0 /Q0 /QF0 /QB0 /QS0 /R0 /S /SP0 /SG0 /SX0 SZ:- /T0 /TR00 /TS0
>> /TD0 /TTA0 /TCA0 /TCC0 /TCW /TM0 /U0 /V0 /W0 /WD /Z0 /ZE0 /ZS0 /ZX0
>>-------------------------------------------------------------------------------
>> Source base directory = "K:\CHECKS\"
>> Destination directory = "G:\2007-09-18\CHECKS\"
>> File name template = "*"
>> Directories processed = 4,448
>> Total data in bytes = 9,027,685,968
>> Elapsed time in sec. = 18,360
>> Action speed (MB/min) = 29.5
>> Files copied = 303,322
>> Directories created = 4,443
>> Log File Appended = e:\20070918.TXT
>> Exit code = 0 (No error, Successful operation)
>>
>>As you can see, you have the total data in bytes and the elapsed time in
>>seconds.
>>
>>Jeff
>>
>



Re: Which is faster - COPY FILE or XXCopy? by Steve

Steve
Thu Sep 27 06:49:05 PDT 2007

On Wed, 26 Sep 2007 19:54:22 -0400, "TonySper"
<tsperduti@nospambellsouth.net> wrote:

>When using the copy in VFP, how do you copy all the subfolders??? Is there a
>command in copy file to copy all the subfolders??? I have used XXCOPY for
>personal use as if you use it commercial you need to purchase a license for
>$40.00 for 1 or 2 users. After that it gets expensive. You cannot distribute
>XXCOPY or include it in your applications.
>Tony

Tony,
Yes, I'm fully aware of the above. In this case there would be only
one user. So far I've only used it myself (quite a while ago) and am
only considering using it for this app (an electrician's estiomating
program).
Steve



Re: Which is faster - COPY FILE or XXCopy? by Steve

Steve
Thu Sep 27 07:25:12 PDT 2007

On Wed, 26 Sep 2007 18:30:37 -0700, "Fred Taylor"
<ftaylor@mvps.org!REMOVE> wrote:

>You have to go through the directory structure yourself in VFP, there's no
>"built-in" way of doing it. You should be able to search for "recurse
>directory" in forums like the UT and find something.

I've seen VFP recursive routines which do that, but I use a .dbf in
combination with ADIR(), which is virtually recursive and at the same
time provides me with a handy list of paths and files in the entire
tree. The folder and/or file names can be sorted to emulate the tree
structure or whatever.

Essentially, it first appends all the subfolder names directly under
the top-level folder to the unindexed dbf. Then it goes back to the
first subfolder record and appends the subfolders under it. Then it
goes to the next subfolder record, etc. Eventually one record is
created for all subfolders, albeit not in tree-structure order, but it
can be sorted to do so.

You can then use ADIR() again to get the file names for any or all of
the folders as desired, and once again be sorted any way you like

Steve.


Re: Which is faster - COPY FILE or XXCopy? by Anders

Anders
Thu Sep 27 04:53:50 PDT 2007

FREAD(handle1,.. ) and FWRITE(handle2,..) has the advantage that they are
in a DO WHILE loop and one can easily update an interesting progress
thermometer to soothe the user, even including calculated time of
completion.

-Anders

"Steve Meyerson" <stevemeyerson@cox.net> wrote in message
news:aoglf392tdr9pgvgdgmpf3d9jm2emtrl5k@4ax.com...
> Thanks a lot, Jeff. Your example will help me tremendously with the
> doc.
>
> Your example took about 5 hrs. At 29.5 MB/min, my "measly" 100MB (max)
> should take 3 or 4 minutes, or less, which is great.
>
> Steve
>
>
>
> On Wed, 26 Sep 2007 12:21:25 -0400, "Jeff Grippe" <jeff@door7.com>
> wrote:
>
>>> I may be able to do the backup totally outside of VFP if I use XXCopy,
>>> but I would need to come up with a way to name each folder so the date
>>> and type of backup (full or incremental) is included in the date for
>>> selective restore purposes - i.e. I need to RTFM :-(
>>
>>
>>XXCOPY does this. It is the reason that I chose it as a tool
>>
>>Here is a sample from my batch file
>>
>>xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C /oA/$YYYYMMDD$.TXT
>>
>>This copies the checks folder from drive K to a folder on drive G whose
>>name
>>(today) would be
>>
>>G:\2007-09-26\CHECKS
>>
>>The final switch /oA/$YYYYMMDD$.TXT
>>
>>Appends to a file called (today) 20070926.TXT which contains the results
>>from the operation. They look like this:
>>
>>===============================================================================
>>XXCOPY ver 2.92.6 2007-09-18 18:18:20 Windows Ver 5.1.2600
>> Command Line = xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C
>>/oA/$YYYYMMDD$.TXT
>>-------------------------------------------------------------------------------
>>Switch Parameters
>> /AXH /AXS /B0 /C /CA /CB0 /CCY /CK /CR3 /D0 /DL0 /E0 /EC0 /ED0 /ER0 /F0
>>/FM0
>> /FF0 /FL /FT0 /FW /H0 /I /IN* /K0 /L0 /N0 /NP0 /NX0 /NI0 /NW /NC0
>> /oAe:\20070918.TXT /oD1 /oE0 /oF1 /oI0 /oP0 /oS0 /oX0 /P0 /PB0 /PBH /PC0
>>/PD0
>> /PN /Po /PZ0 /Q0 /QF0 /QB0 /QS0 /R0 /S /SP0 /SG0 /SX0 SZ:- /T0 /TR00 /TS0
>> /TD0 /TTA0 /TCA0 /TCC0 /TCW /TM0 /U0 /V0 /W0 /WD /Z0 /ZE0 /ZS0 /ZX0
>>-------------------------------------------------------------------------------
>> Source base directory = "K:\CHECKS\"
>> Destination directory = "G:\2007-09-18\CHECKS\"
>> File name template = "*"
>> Directories processed = 4,448
>> Total data in bytes = 9,027,685,968
>> Elapsed time in sec. = 18,360
>> Action speed (MB/min) = 29.5
>> Files copied = 303,322
>> Directories created = 4,443
>> Log File Appended = e:\20070918.TXT
>> Exit code = 0 (No error, Successful operation)
>>
>>As you can see, you have the total data in bytes and the elapsed time in
>>seconds.
>>
>>Jeff
>>
>



Re: Which is faster - COPY FILE or XXCopy? by TonySper

TonySper
Thu Sep 27 15:06:09 PDT 2007

Fred,
Yes I was just noting a problem. Microsoft has included ROBOCOPY in their
VISTA now as well as XCOPY. The problem with both of them is that when it
comes across a file that it can't access it just errors out and stops. (PAIN
PAIN PAIN). I have found that XXCOPY has the option to just skip the file
and continue coping. Sometime try and copy your C:\DOCUMENTS AND SETTING
folder and ROBOCOPY and XCOPY will error out but XXCOPY will just skip the
file and continue. You would think there would be a way of doing this with
XCOPY or ROBOCOPY. If there is I wish someone would advise me how.
Tony

"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:OIPjxWKAIHA.2268@TK2MSFTNGP02.phx.gbl...
> You have to go through the directory structure yourself in VFP, there's no
> "built-in" way of doing it. You should be able to search for "recurse
> directory" in forums like the UT and find something.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "TonySper" <tsperduti@nospambellsouth.net> wrote in message
> news:%23iVGUiJAIHA.4656@TK2MSFTNGP04.phx.gbl...
>> When using the copy in VFP, how do you copy all the subfolders??? Is
>> there a command in copy file to copy all the subfolders??? I have used
>> XXCOPY for personal use as if you use it commercial you need to purchase
>> a license for $40.00 for 1 or 2 users. After that it gets expensive. You
>> cannot distribute XXCOPY or include it in your applications.
>> Tony
>>
>> "Steve Meyerson" <stevemeyerson@cox.net> wrote in message
>> news:aoglf392tdr9pgvgdgmpf3d9jm2emtrl5k@4ax.com...
>>> Thanks a lot, Jeff. Your example will help me tremendously with the
>>> doc.
>>>
>>> Your example took about 5 hrs. At 29.5 MB/min, my "measly" 100MB (max)
>>> should take 3 or 4 minutes, or less, which is great.
>>>
>>> Steve
>>>
>>>
>>>
>>> On Wed, 26 Sep 2007 12:21:25 -0400, "Jeff Grippe" <jeff@door7.com>
>>> wrote:
>>>
>>>>> I may be able to do the backup totally outside of VFP if I use XXCopy,
>>>>> but I would need to come up with a way to name each folder so the date
>>>>> and type of backup (full or incremental) is included in the date for
>>>>> selective restore purposes - i.e. I need to RTFM :-(
>>>>
>>>>
>>>>XXCOPY does this. It is the reason that I chose it as a tool
>>>>
>>>>Here is a sample from my batch file
>>>>
>>>>xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C /oA/$YYYYMMDD$.TXT
>>>>
>>>>This copies the checks folder from drive K to a folder on drive G whose
>>>>name
>>>>(today) would be
>>>>
>>>>G:\2007-09-26\CHECKS
>>>>
>>>>The final switch /oA/$YYYYMMDD$.TXT
>>>>
>>>>Appends to a file called (today) 20070926.TXT which contains the results
>>>>from the operation. They look like this:
>>>>
>>>>===============================================================================
>>>>XXCOPY ver 2.92.6 2007-09-18 18:18:20 Windows Ver 5.1.2600
>>>> Command Line = xxcopy K:\CHECKS\ G:\/$YYYY-MM-DD$\CHECKS\ /S /I /C
>>>>/oA/$YYYYMMDD$.TXT
>>>>-------------------------------------------------------------------------------
>>>>Switch Parameters
>>>> /AXH /AXS /B0 /C /CA /CB0 /CCY /CK /CR3 /D0 /DL0 /E0 /EC0 /ED0 /ER0 /F0
>>>>/FM0
>>>> /FF0 /FL /FT0 /FW /H0 /I /IN* /K0 /L0 /N0 /NP0 /NX0 /NI0 /NW /NC0
>>>> /oAe:\20070918.TXT /oD1 /oE0 /oF1 /oI0 /oP0 /oS0 /oX0 /P0 /PB0 /PBH
>>>> /PC0
>>>>/PD0
>>>> /PN /Po /PZ0 /Q0 /QF0 /QB0 /QS0 /R0 /S /SP0 /SG0 /SX0 SZ:- /T0 /TR00
>>>> /TS0
>>>> /TD0 /TTA0 /TCA0 /TCC0 /TCW /TM0 /U0 /V0 /W0 /WD /Z0 /ZE0 /ZS0 /ZX0
>>>>-------------------------------------------------------------------------------
>>>> Source base directory = "K:\CHECKS\"
>>>> Destination directory = "G:\2007-09-18\CHECKS\"
>>>> File name template = "*"
>>>> Directories processed = 4,448
>>>> Total data in bytes = 9,027,685,968
>>>> Elapsed time in sec. = 18,360
>>>> Action speed (MB/min) = 29.5
>>>> Files copied = 303,322
>>>> Directories created = 4,443
>>>> Log File Appended = e:\20070918.TXT
>>>> Exit code = 0 (No error, Successful operation)
>>>>
>>>>As you can see, you have the total data in bytes and the elapsed time in
>>>>seconds.
>>>>
>>>>Jeff
>>>>
>>>
>>
>>
>
>



Re: Which is faster - COPY FILE or XXCopy? by Fred

Fred
Thu Sep 27 22:11:59 PDT 2007

There might be away to do it with ROBOCOPY. Have you looked at the manual?
35 or so pages for a copy command!


--
Fred
Microsoft Visual FoxPro MVP


"TonySper" <tsperduti@nospambellsouth.net> wrote in message
news:O08OdKVAIHA.4836@TK2MSFTNGP06.phx.gbl...
> Fred,
> Yes I was just noting a problem. Microsoft has included ROBOCOPY in their
> VISTA now as well as XCOPY. The problem with both of them is that when it
> comes across a file that it can't access it just errors out and stops.
> (PAIN PAIN PAIN). I have found that XXCOPY has the option to just skip the
> file and continue coping. Sometime try and copy your C:\DOCUMENTS AND
> SETTING folder and ROBOCOPY and XCOPY will error out but XXCOPY will just
> skip the file and continue. You would think there would be a way of doing
> this with XCOPY or ROBOCOPY. If there is I wish someone would advise me
> how.
> Tony
>
> "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> news:OIPjxWKAIHA.2268@TK2MSFTNGP02.phx.gbl...
>> You have to go through the directory structure yourself in VFP, there's
>> no "built-in" way of doing it. You should be able to search for "recurse
>> directory" in forums like the UT and find something.
>>
>> --
>> Fred
>> Microsoft Visual FoxPro MVP
>>
>>
>> "TonySper" <tsperduti@nospambellsouth.net> wrote in message
>> news:%23iVGUiJAIHA.4656@TK2MSFTNGP04.phx.gbl...
>>> When using the copy in VFP, how do you copy all the subfolders??? Is
>>> there a command in copy file to copy all the subfolders??? I have used
>>> XXCOPY for personal use as if you use it commercial you need to purchase
>>> a license for $40.00 for 1 or 2 users. After that it gets expensive. You
>>> cannot distribute XXCOPY or include it in your applications.
>>> Tony
>>>
>>> "Steve Meyerson" <stevemeyerson@cox.net> wrote in message
>>> news:aoglf392tdr9pgvgdgmpf3d9jm2emtrl5k@4ax.com...
>>>> Thanks a lot, Jeff. Your example will help me tremendously with the
>>>> doc.
>>>>
>>>> Your example took about 5 hrs. At 29.5 MB/min, my "measly" 100MB (max)
>>>> should take 3 or 4 minutes, or less, which is great.
>>>>
>>>> Steve
>>>>
>>>>
>>>>
>>>> On Wed, 26 Sep 2007 12:21:25 -0400, "Jeff Grippe" <jeff@door7.com>
>>>> wrote:
&