>>That's not unexpected since VFP opens the file for every record, it was more to check the concept. Try this instead:
>>
>>Create Cursor BILLCOMPRESS (PS C(254))
>>Append From (m.CPSFILEPATH) Sdf
>>lcText=''
>>scan
>> lcText = lcText + trim(ps)
>>Endscan
>>Strtofile(lcText,newpath)
>
>Yuck - if Len(lcText) grows much beyond 2**16 you will hamper vfp heavily by forcing to allocate new memory. Turn to LLF instead, more stable overall.
No problem, I actually agree with you. The thing is that it's been a long time since I used the low level file functions, so I just wrote down a few lines from memory. This should be the fastest and overall best solution, I hope you agree.
lnHandle = fcreate(newpath)
scan
fwrite(lnHandle,trim(ps))
Endscan
fclose(lnHandle)