• Log in or sign up for an account here: https://www.sythe.org/login

Editing Text File

  • Thread starter Thread starter WalangAlam
  • Start date Start date
W

WalangAlam

Guest
got text file sos.dlm and some of the line contain *. I want to change all the asterisk to 0

-content of my text file -----------------
"2073308","4","2","1","2","1","1","4","4","2","1", "2","4","*","4","2","1","1","1","1"
"2074698","4","2","4","4","3","4","*","3","4","1", "3","4","4","4","4","4","4","*","4
"2074655","2","1","4","3","2","4","2","2","2","*", "3","3","3","4","3","3","4","3","4"
---------------------------------------

tried this code but did NOT work for me.

Private Sub Edit_Text_File()
Dim sFileText As String = My.Computer.FileSystem.ReadAllText(sTextFileNamePa th)
sFileText.Replace("*", "0")
My.Computer.FileSystem.WriteAllText(sTextFileNamePath, sFileText, False)
MessageBox.Show("Okley")
End Sub
 
Member of the Month Winner
Sythe's 10th Anniversary
yup, as F/I said.

Sort of off topic, but that is one intriguing number set, whats the story with it?
 
Thanks much. It worked! And your reply here is faster than other forum sites. Guess i will be a regular here.

That's a delimited output file from an OMR Pearson Scanner. I'm converting it to .mdf file in an integer field. My conversion code rejects * to be placed in an integer field so i got to change * first to 0 before conversion.

Thanks much for the fast and accurate response.
 
Runescape Gamblingrunescape gambling
Back
Top