<b> >nIndex = 1 >DO WHILE nIndex <= ALEN( aFileList, 1 ) <i>AND ! THISFORM.lAborted</i> > . > . > . >ENDDO ></b>>
FOR nIndex = 1 TO ALEN( aFileList, 1 ) * Do copy stuff DOEVENTS() IF thisform.lAborted EXIT ENDIF ENDFORPaul's recommendation about using SHFileOperation is a good one; the necessary SHFILEOPSTRUCT structure can be created using Paul's POINTERS class or my CLSHEAP class. SHFileOperation will do some useful stuff for you, like throw up a progress bar, trap file copy errors without triggering a VFP error (you can detect if any occurred by checking the fAnyOperationsAborted member of the SHFILEOPSTRUCT on return. Read the MSDN entry on the SHFILEOPSTRUCT carefully, since you can construct lists of files and pass them to the API call, and each entry can contain wildcards as appropriate. There are also a number of flags you'll want to look at. This is all covered in the MSDN doc.