我正在尝试将标签删除的文件拆分为具有相似标题的部分。我有我的逻辑。但是,我正在尝试逐行读取输入文件并将其写入另一个文件。当我打开输出文件时,它不包含任何数据。这是我的代码。
有人可以帮我这里出了什么问题吗?
注意:以下代码不包含拆分文件的实际逻辑
Wscript.Echo "Begin"
InputFile = "test.txt"
Set InputFSO = CreateObject("Scripting.FileSystemObject")
Set InputFileObject = InputFSO.OpenTextFile(InputFile)
HeaderLine = InputFileObject.ReadLine
Do While InputFileObject.AtEndOfStream <> True
strTemp = InputFileObject.SkipLine
Loop
TotalLines = InputFileObject.Line-1
Set OutputFSO = CreateObject("Scripting.FileSystemObject")
Set OutputFileObject = OutputFSO.CreateTextFile("out.txt")
#Code for reading line by line and writing it to another file
Do While not InputFileObject.AtEndOfStream
line = InputFileObject.Readline
OutputFileObject.WriteLine(line)
Loop
Set InputFileObject = Nothing
Set OutputFileObject = Nothing
Wscript.Echo "Completed"