I am trying to count the number of lines in file1 and append that number and some other data to file2. Then create and append file2 to file3 and finally append file1.
Esentially, I want file3 to be file2 + file3. Does my code support that? I am new to VB.
Thanks in advance,
Donald
Esentially, I want file3 to be file2 + file3. Does my code support that? I am new to VB.
Code:
Private Sub Form_Load()
Dim fso1, fso2, fso3, a, b, c
Dim Count As Long
Set fso1 = CreateObject("Scripting.FileSystemObject")
Set a = fso1.OpenTextFile("D:\Partner_Supplemental_Info\Amazon\datafeedout\SQL\products_tmp.txt", 1, False, 0)
Do While a.readline = True
Count = Count + 1
Loop
Set fso2 = CreateObject("Scripting.FileSystemObject")
Set b = fso2.OpenTextFile("D:\Partner_Supplemental_Info\Amazon\datafeedout\SQL\tmp_info_container.txt", 8, True, 0)
Dim count_data As String
Dim file_type As String
count_data = Count
file_type = "Product"
b.WriteLine (count_data + file_type + datetimestamp + )
b.Close
Set fso3 = CreateObject("Scripting.FileSystemObject")
Set c = fso3.CreateTextFile("D:\Partner_Supplemental_Info\Amazon\datafeedout\Amazon_Products.txt", True)
Dim SomeString As String
c.Write (a.readall())
c.Write (b.readall())
c.Close
End Sub
Thanks in advance,
Donald