create cursor lcTempCursor ; (WorkField M) append blank for i=1 to lntxtfiles lcFileName=lcPath+laTxtFiles[i,1] lnFileSize=laTxtFiles[i,2] && File Size lcSendFileName = lcPath+lcCurState+'\'+left(laTxtFiles[i,1],4)+'.txt' wait window nowait 'Preparing file '+lcSendFileName if file(lcSendFileName) erase (lcSendFileName) endif if lnFileSize< 5000000 && Small files append memo WorkField from (lcFileName) overwrite if !empty(alltrim(WorkField)) replace WorkField with strtran(WorkField,'"','') copy memo WorkField to (lcSendFileName) endifI changed it to be (I commented maximum size just for now, because the previous size doesn't work):
wait window nowait 'Preparing file '+lcSendFileName if file(lcSendFileName) erase (lcSendFileName) endif if lnFileSize< 5000000 && 16777184 && Relatively small files <16 MB lcString=filetostr(lcFileName) lcString=strtran(lcString,["],'') && Remove double quotes llReturn=strtofile(lcString, lcSendFileName)The first code works. The last code doesn't for some reason. I thought, the last code is more efficient, that's why I changed this program. What could be wrong here?