G
Guest
I would like to import IIS log records into Access 2003 and used them to
generate performance and activity reports and graphs for my customers. I have
already developed a series of reports, queries, and graphs, and now must
import these IIS log records into Access 2003.
These records are in a standard text format but have an extension of *.log.
If I change the extension on individual records from .log to .txt, I can
import them into Access and everything works fine. However, I need to import
an extremely large number of records and cannot do this using this method. I
found the following script that performs this function but do not know how
get it into an executable form. Any suggestions regarding how to do this will
be greatly appreciated. Also, if there is an alternative way of accomplishing
this,please let me know.
Thanks in advance,
Jim
--
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set FileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='c:\Scripts'} Where " _
& "ResultClass = CIM_DataFile")
For Each objFile In FileList
If objFile.Extension = "log" Then
strNewName = objFile.Drive & objFile.Path & _
objFile.FileName & "." & "txt"
errResult = objFile.Rename(strNewName)
Wscript.Echo errResult
End If
Next
Complete article including script can be found at:
http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_ygwy.mspx
generate performance and activity reports and graphs for my customers. I have
already developed a series of reports, queries, and graphs, and now must
import these IIS log records into Access 2003.
These records are in a standard text format but have an extension of *.log.
If I change the extension on individual records from .log to .txt, I can
import them into Access and everything works fine. However, I need to import
an extremely large number of records and cannot do this using this method. I
found the following script that performs this function but do not know how
get it into an executable form. Any suggestions regarding how to do this will
be greatly appreciated. Also, if there is an alternative way of accomplishing
this,please let me know.
Thanks in advance,
Jim
--
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set FileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='c:\Scripts'} Where " _
& "ResultClass = CIM_DataFile")
For Each objFile In FileList
If objFile.Extension = "log" Then
strNewName = objFile.Drive & objFile.Path & _
objFile.FileName & "." & "txt"
errResult = objFile.Rename(strNewName)
Wscript.Echo errResult
End If
Next
Complete article including script can be found at:
http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_ygwy.mspx