Thanks Manivel,
This should do the trick!
>Hi Bill,
>The following code should remove the control character and you have to thank Ralph.
>********************************************************
>Function StripEoF
>********************************************************
>*
>* Written by: Ralph P. Morse Jr. (c) 1995
>* RalphMorse@msn.com
>*
>* Parameter: Path:\FileName
>*
>* Returns:
>* -1 = File access denied
>* 0 = File did not end with
>* +1 = successfully removed
>*
>* Strips an end-of-file byte (0x1Ah) off of a given
>* file if such a byte exists. If the file does
>* not end with an EoF byte, it will not be altered.
>*
>* Usage: =StripEoF("drive:\path\filename.ext")
>********************************************************
>Parameter PCFileName
>Private ;
> JNFileSize ;
> JNFileHand
>
>JNFileHand = FOpen(PCFileName, 12)
>
>If JNFileHand = -1
> Return -1
>Endif
>
>JNFileSize = FSeek(JNFileHand, -1, 2)
>
>If Asc(FRead(JNFileHand, 1)) = 26
> =FChSize(JNFileHand, JNFileSize)
> =FClose(JNFileHand)
> Return 1
>Else
> =FClose(JNFileHand)
> Return 0
>Endif
>**********
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only