Posts

Showing posts from July, 2012

DHCP Log Parser

I am sharing the script which I had created long time back for parsing DHCP Logs. This script will pull out computer name and IP address details for each log files placed in "DHCPLogs" folder and save the result in .CSV file. Steps: 1. Copy the script in notepad and save as "DHCPLogParser.vbs" or whatever you like. 2. Create a folder named "DHCPLogs" in script directory. 3. Copy all DHCP Logs with folders / subfolders in "DHCPLogs" folder 4. Run the script 5. Result will be saved in DHCPLog-Parsed.csv file. Dim objCurrentFolder Set objFso = CreateObject("Scripting.FileSystemObject") Set objResult = objFso.CreateTextFile("DHCPLog-Parsed.csv") CheckFolder objFso.GetFolder ("DHCPLogs") WScript.Echo "Done !!!" '#### Sub CheckFolder Sub CheckFolder(objCurrentFolder) For Each objFile In objCurrentFolder.Files 'WScript.Echo "Processing " & objFile.Path &