>>>Dear everyone
>>>How can you make a backup copies of your foxpro program folder during run time when you issue eg., copy file C:\fox\*.* to d:\mycopy\*.* without creating an error "file is in use". I laready tried the "close all" command but it did not work. Thanks
>>
>>You might try using the Win32 API call SHFileOperation() to perform the copy - it allows for wildcarding, copying of shared files and continuing to copy in the face of copy errors. It's documented in the Win32 API section.
>
>Ed,
>
>Does it also allow to copy an entire folder - with all subfolders?
>
>Actually, I am looking for
any relatively simple sample to compare API and WSH, for a programming course I am giving.
>
Hilmar,
The Shell.Application object has a method to do this. In fact, at this moment I'm backing up a directory tree using it (I do it daily). The Shell.Application object method wraps the SHFileOperation() call that Ed mentions in his post. I wrote an article about it (June, I think) in 2000 for the VFUG newsletter.
George
Ubi caritas et amor, deus ibi est