"Mark" <mn******@neb.r r.com> wrote in message
news:uK******** ********@TK2MSF TNGP10.phx.gbl. ..
I need to remove a square character from a text file.
How can I locate a square character and remove it?
No idea which is the "square" character, but here's a fragment to
trash all the spaces :
Dim reader as New System.IO.Strea mReader( "file" )
Dim sData as String _
= reader.ReadToEn d()
reader.Close()
sData = sData.Replace( " ", "" )
Dim writer as New System.IO.Strea mWriter( "file", False )
writer.Write( sData )
writer.Close()
And yes; it /does/ read the entire file into a String, do a Replace and
write the whole lot back again; even in the Brave New World that is
(or was) ".Net", you /still/ can't zap and reshuffle individual bytes in a
sequential disk file directly - which is probably a Good Thing ;-)
HTH,
Phill W.