Walter, thanks for the tip! Not only that, how did you get that code snippet to display so nicely?
>Hi Chaim,
>
>I've run into this very same problem yesterday, the solution was in fact very simple:
>=ADIR(aFiles,"data\*.*")
>
>DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
> STRING @SourceFileName, ;
> STRING @DestFileName, ;
> INTEGER bFailIfExists
>
>nSucces=0
>FOR nT = 1 TO ALEN(aFiles,1)
> nSucces=CopyFile(SYS(5)+SYS(2003)+"\data\"+aFiles[nT,1],;
> SYS(5)+SYS(2003)+"\dataexport\"+aFiles[nT,1],0)
>
> .... show progress or something
>
> IF nSucces = 0
> ... Handle error
> exit
> ENDIF
>ENDFOR
GoodLuck,
>
>Walter,
>
>>I need to copy DBFs / CDXs / FPTs from one directory to another (for backup purposes). The VFP command COPY FILE fails if the table is open. I am currently shelling to DOS and using the COPY command (in DOS) which works even when the table is open, but I would rather not shell out to DOS. Are there any alternatives? I also don't want to resort to ActiveX controls.
>> Thanks, Chaim