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
-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






