>Hi Nadya:
>
>I tried what you suggest. Did not get the error message, but nothing got copied either to the MyConCatfile. The files that need to be copied are sdf and MyConCatFile also should be an sdf file. Here is the current code,with minor variations from what Ed suggested to me.
>
>
LOCAL cConCatString, aBWFiles[1,5], nFiles, i
>
>cConCatString = ''
>nFiles = adir(aBWFiles, "c:\BW\Process*.dat")
>
>FOR i = 1 TO nFiles
> cConCatString = cConCatString + FILETOSTR("c:\BW\" + aBWFiles[i,1])
>ENDFOR
>=STRTOFILE(cConCatString,'MyConCatFile.DAT',.F.)
>RELEASE cConCatString
>
>Problem now is that nothing is being copied. Second the MyConCatFile appears as a text file and not an sdf type.
>
>Thanks
First of all, add CHR(13)+CHR(10), e.g.
#define CRLF chr(13)+chr(10)
cConCatString = m.cConCatString + CRLF+FILETOSTR("c:\BW\" + aBWFiles[i,1])
Secondly, the code looks fine and should work, unless you have huge files. Try to examine the files first...
If it's not broken, fix it until it is.
My Blog