It was just a sample code that used ADIR() function to get a list of files to copy. How your ppogram knows what files to copy?
>>Sorry, there was incomplete line in FOR statement. It should be
>
FOR i=1 TO ALEN(laFileList,1)
>> STRTOFILE(FILETOSTR(lcDir + laFileList[i,1]), lcResultFile, .T.)
>>ENDFOR
>>
BTW, which line gave the error?
>>
>Thanks Sergey. If I understand this correctly, the above code will copy the contents of one file in laFilelist. Am I right? The idea is that There may be more than 1 files in the BW Directory, all of which should be copied to a single sdf document, one after the other.
>
>The error was in the Strtofile() line. Thanks again Sergey.
--sb--