>LOCAL i, gnErrFile, pnSize, lnSeconds >lnSeconds = SECONDS() >FOR i=1 TO 1000 > STRTOFILE( 'Error information to be written here' + CHR(13) + CHR(10),'errors1.txt', .t.) >NEXT >=MESSAGEBOX(SECONDS() - m.lnSeconds) > >lnSeconds = SECONDS() >FOR i=1 TO 1000 > >IF FILE('errors.txt') && Does file exist? > gnErrFile = FOPEN('errors.txt',12) && If so, open read/write > pnSize = FSEEK(gnErrFile,0,2) >ELSE > gnErrFile = FCREATE('errors.txt') && If not create it >ENDIF >IF gnErrFile < 0 && Check for error opening file > WAIT 'Cannot open or create output file' WINDOW NOWAIT >ELSE && If no error, write to file > =FWRITE(gnErrFile , 'Error information to be written here') >ENDIF >=FCLOSE(gnErrFile ) && Close file >NEXT >=MESSAGEBOX(SECONDS() - m.lnSeconds) >>