Log analysis Tool for PT:
1. PT data collection
2. log collection
'创建一个FileSystemObject对象的事例
Set MyFileObject=CreateObject("Scripting.FileSystemObject")
'创建一个Folder对象
Set MyFolder=MyFileObject.GetFolder("D:\HKSG2013_iCRM2\PT\UAT data preparation\log\log")'
'循环显示其中文件
dim count
count=0 '计算文件个数
For Each thing in MyFolder.Files
outputline(thing)
count=count+1
Next
sub outputline(filename)
set fso=createobject("scripting.filesystemobject")
set file=fso.opentextfile(filename)
dim i
Const ForAppending=8
for i=0 to 2
i=i+1
'skipline 跳过一行
h=file.readline
'h=h&vbcrlf
Next
file.close
'set file=fso.createtextfile("Log_summary.txt")
Set file=fso.OpenTextFile("D:\HKSG2013_iCRM2\PT\UAT data preparation\log\Log_summary.txt",ForAppending)
'file.write h
file.WriteLine h
file.close
End sub