I have a basic script that compares two text files and writes a new file with the difference on a new line.
I want to be able to add the filename to the end of each line but I need some help
Code[Set fso=CreateObject("Scripting.FileSystemObject")
Set txtfile=fspenTextFile("c:\thursday.txt")
data=txtfile.readAll
txtfile.close
txtArray=split(data,vbCRLF)
Set txtfile=fspenTextFile("c:\friday.txt")
data=txtfile.readAll
txtfile.close
dim list
for n=0 to ubound(txtArray)
if instr(data,txtArray)=0 then list=list & txtArray & vbCRLF
next
Set txtfile=fso.CreateTextFile("fridayMissing.txt")
txtfile.write list
txtfile.close
]
Hope you can help -
I want to be able to add the filename to the end of each line but I need some help
Code[Set fso=CreateObject("Scripting.FileSystemObject")
Set txtfile=fspenTextFile("c:\thursday.txt")
data=txtfile.readAll
txtfile.close
txtArray=split(data,vbCRLF)
Set txtfile=fspenTextFile("c:\friday.txt")
data=txtfile.readAll
txtfile.close
dim list
for n=0 to ubound(txtArray)
if instr(data,txtArray)=0 then list=list & txtArray & vbCRLF
next
Set txtfile=fso.CreateTextFile("fridayMissing.txt")
txtfile.write list
txtfile.close
]
Hope you can help -