lcLogRecord = DTOS(DATE()) + '-' + TIME() + tcActionDesc + CHR(13) + CHR(10) IF STRTOFILE(lcLogRecord, 'faxbol.log', .T.) = 0 WAIT 'Cannot open or create output action log file' WINDOW NOWAIT ENDIF>I'm trying to create a "log" file of occurences within a system. I'm using FCREATE/FOPEN/FPUTS and can't get a new record created each time it is written. Is there a parameter that allows additional records to be added to a text file opened with FOPEN? The code is as follows:
>IF FILE('faxbol.log') > lnActionFile = FOPEN('faxbol.log',12) >ELSE > lnActionFile = FCREATE('faxbol.log') >ENDIF >IF lnActionFile < 0 > WAIT 'Cannot open or create output action log file' WINDOW NOWAIT >ELSE <b>= FSEEK(lnActionFile, 0,2)</b> && Move pointer to the end of the file > =FPUTS(lnActionFile, DTOS(DATE()) + '-' + TIME() + tcActionDesc) >ENDIF >=FCLOSE(lnActionFile) >>Thanks in advance,