文件的读与存
我想通过FSO读取文件并显示出来,然后再存到另一文件中,请问如何写这几句代码?谢谢
文件的读与写
Dim filereader As New FileSystemObject
Dim file1 As TextStream
Dim file2 As TextStream
Dim str As String
Set file1 = filereader.OpenTextFile("f:\b.txt", ForReading, True)
Set file2 = filereader.OpenTextFile("f:\d.txt", ForWriting, True)
Do While Not file1.AtEndOfLine
str = file1.ReadLine
file2.WriteLine (str)
Debug.Print str
Loop