![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
19/08/2011, 11:13
|
| | Fecha de Ingreso: junio-2011
Mensajes: 329
Antigüedad: 13 años, 7 meses Puntos: 2 | |
Respuesta: Borrar caracteres de .txt Yo creo q contar los caracteres es la mejor opcion, hice este codigo pero para borrar ciertos caracteres:
Dim Fs As FileStream = New FileStream("\\Dell\compartido\agosto\1MRM0412304Y9 072011.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite)
Dim sw As New StreamWriter(Fs)
Dim sr As New StreamReader(Fs)
Dim str As String
str = sr.ReadToEnd()
str = str.Replace("|08/07/2011|", "||")
str = str.Replace("|0|", "||")
'str = str.Replace(vbCrLf, "")
Fs.Position = 0
Fs.SetLength(str.Length)
sw.Write(str)
sw.Flush()
MessageBox.Show("OK")
sw.Close()
Fs.Close()
como podria ser para contar los caracteres..?..saludos y gracias por sus respuestas. |