FUNCTION filetostring LPARAMETER lcdatafile && .txt (line sequential) file lndfh=FOPEN(lcdatafile) lcparameter="" IF lndfh > 0 nsize = FSEEK(lndfh, 0, 2) && Move to EOF IF nsize <= 0 ELSE = FSEEK(lndfh, 0, 0) DO WHILE NOT FEOF(lndfh) lcparameter=lcparameter+FREAD(lndfh,nsize) ENDDO * cwcofc = lcparameter ENDIF =FCLOSE(lndfh) ELSE * Error opening data file Wait window "File "+lcdatafile+" do not exists !!" nowait ENDIF RETURN lcparameter function stringtofile parameter mMystring, lcdatafile && memo field, output file lndfh = fopen(lcdatafile) && you can use fcreate instead of fopen if lndfh > 0 memo_size = memlines(mMystring) for i = 1 to memo_size m.cLyne = MLINE(mMystrring, i) =fputs(lndfh, m.cLyne) && depending on how your file is organized you can use fwrite endfor =FCLOSE(lndfh) else Wait window "File "+lcdatafile+" do not exists !!" nowait endif returnHTH