I've found that most programs that don't like the EOF character at the end of a text file, also don't like a trailing CRLF. If you don't have this problem, kill that part of the code. If you want to "see" it happen, undelete the * on the WAITs.
*!* STRIPEOF.PRG PARAMETERS qcFileName
* Open the file with unbuffered read/write access lnhandle = FOPEN(qcFileName,12)
* Test for possible file opening error IF lnhandle = -1 WAIT WINDOW "Error Opening File: " ; + ALLTRIM(qcFileName)TIMEOUT 10 RETURN ENDIF
l_nSize = FSEEK(lnHandle,0,2) && Determine file size l_nOrgSize = l_nSize && save so we know if we've stripped anything = FSEEK(lnHandle, -3, 2) && Sneak a peak at the last 3 characters l_cLastChars = FREAD(lnHandle,3) l_nLastChar = INT(ASC(SUBSTR(l_cLastChars,3,1)))