18 lines
517 B
Plaintext
18 lines
517 B
Plaintext
'byte copy
|
|
My.Computer.FileSystem.WriteAllBytes("output.txt", _
|
|
My.Computer.FileSystem.ReadAllBytes("input.txt"), False)
|
|
|
|
'text copy
|
|
Using input = IO.File.OpenText("input.txt"), _
|
|
output As New IO.StreamWriter(IO.File.OpenWrite("output.txt"))
|
|
output.Write(input.ReadToEnd)
|
|
End Using
|
|
|
|
'Line by line text copy
|
|
Using input = IO.File.OpenText("input.txt"), _
|
|
output As New IO.StreamWriter(IO.File.OpenWrite("output.txt"))
|
|
Do Until input.EndOfStream
|
|
output.WriteLine(input.ReadLine)
|
|
Loop
|
|
End Using
|