Dim fileReader As String = My.Computer.FileSystem.ReadAllText("C:est.txt").Replace("foo", "bar")
My.Computer.FileSystem.WriteAllText("C:est2.txt", fileReader, False)
So you should use the ReadAllText method of the FileSystem, pass the path as parameter and use the Replace method to replace what you want to replace. For more advanced usages of replace you can use regular expressions. You can read about that here.
Shorter version:
My.Computer.FileSystem.WriteAllText("C:est2.txt", My.Computer.FileSystem.ReadAllText("C:est.txt").Replace("foo", "bar"), False)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…