LOCAL cConCatString, aBWFiles[1,5], nFiles, i >> >>cConCatString = '' >>nFiles = adir(aBWFiles, "c:\BW\Process*.dat") >> >>FOR i = 1 TO nFiles && this avoids all copies if no files were found >> cConCatString = cConCatString + FILETOSTR("c:\BW\" + aBWFiles[i,1]) >>ENDFOR >>=STRTOFILE(cConCatString,'MyConCatFile.DAT',.F.) && .T. would append to any existing MyConCatFile.DAT found >>RELEASE cConCatString && releases the large string memory allocation>>
LOCAL array aBWFiles[1] >local lnFiles, ix >lnFiles = adir(aBWFiles, "c:\BW\Process*.dat") >erase ('MyConCatFile.DAT') && erase old if exists >FOR ix = 1 TO lnFiles && this avoids all copies if no files were found > strtofile(FILETOSTR("c:\BW\" + aBWFiles[ix,1]),'MyConCatFile.DAT',.t.) >ENDFOR >Cetin