If I had to start from scratch...

I'd use my own dirsubs.prg routine to fill a foxpro cursor with all of the files in all of the folders/subfolders in the from directory.

Then I'd;

1) SELECT and group by subfolder into another cursor
2) Build the complete directory tree on the destination drive
3) Copy each file in the original cursor to the destination folder/filename
   with "Copy FILE <from> TO <to>
   logging any that don't copy -- on error...

The dirsubs routine is included in my chkstr.zip on the leafe.com download site or can be downloaded from www.chetgardiner.com/dirsubs.zip (in about 5 minutes -- 6:15pm PDT)

Chet


Nick Causton wrote:

Any suggestions how I can move a directory (including any subdirectories and
files) from one drive to another?

So far I have tried:
MoveFile Win32API - will not move across drives, also does not like UNC file
paths
WScript.Shell - Fails with OLE error code 0x800a0046/004c/003a if directory
has multiple subdirectories
XCOPY - RUN command fails because command length > 256 characters (very long
directory/file names)

Nick




[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** 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