MyFileAsString = FILETOSTR("D:\switch\from\2005Ch041119.001") mybadChars = CHR(161)+CHR(7)+CHR(130)+CHR(5)+CHR(3)+CHR(26)+CHR(16)+CHR(3)+CHR(2) && You can see the with some HexEditor or Viewer STRTOFILE(STRTRAN(MyFileAsString, mybadChars, SPACE(9), "Ch041119.new")but If You Want to remove ALL non printable chars the best way is
MyFileAsString = FILETOSTR("D:\switch\from\2005Ch041119.001") FOR myC = 0 TO 31 && All Non printable Chars MyFileAsString = CHRTRAN(MyFileAsString, CHR(myC)," ") NEXTthis will leave You some chars as CHR(161) and CHR(130) and will remove CRLF - CHR(13)+CHR(10), but I am sure You will manage this :o)))