![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | extract the necessary rowdata from log/txt file from query eventqu I got the output log/txt/csv file from eventquery.vbs. and now I just want to extract the necesary rowdata from the output file which eventquery syntex can;t do. The output file from eventquery is very complicated and i want to make the view more simple. Would you please tell me how. thanks. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: extract the necessary rowdata from log/txt file from query eventqu "tonycd" <tonycd@xxxxxx> wrote in message news:6A21F0DD-45F7-4E5B-A7EF-CE52D5943A47@xxxxxx Quote: >I got the output log/txt/csv file from eventquery.vbs. and now I just want >to > extract the necesary rowdata from the output file which eventquery syntex > can;t do. The output file from eventquery is very complicated and i want > to > make the view more simple. Would you please tell me how. thanks. a) your eventquery command, and b) a typical output line you wish to massage, and c) the output format you wish to achieve. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: extract the necessary rowdata from log/txt file from query eve "tonycd" <tonycd@xxxxxx> wrote in message news:18DFC342-24FE-42C6-B1CF-0A41B6E748C4@xxxxxx Quote: > Hi Pegasus > > Thanks. Below is the simple for your information. and i just want to > remove > some column and remain some information from description column (the > information why the staff failure to logon). Thanks again. > > regards > Tony > based on you using the "/fo CSV" switch when running eventquery.vbs. You may want to massage the "Description" column further in order to enhance readability. You could, of course, modify eventquery.vbs itself. This implies that you familiarise yourself with the way the program is designed. Set oFSO = CreateObject("Scripting.FileSystemObject") Set oLog = oFSO.OpenTextFile("d:\Event.txt") Const Type_ = 0, Event_ = 1, DateTime = 2, Source = 3, Computer = 4 Const Category = 5, User = 6, Description = 7 Const sDelimiter = """,""" While Not oLog.AtEndOfStream sLine = Replace(oLog.ReadLine, sDelimiter, "|") if len(sLine) > 0 then sLine = Left(sLine, Len(sLine) - 1) aLine = Split(sLine, "|") If UBound(aLine) < 7 Then WScript.Echo sLine Else WScript.Echo WScript.Echo "Date: ", aLine(DateTime) WScript.Echo "Category: ", aLine(Category) WScript.Echo "User: ", aLine(User) WScript.Echo "Description", aLine(Description) End If Wend oLog.Close |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| CAN'T EXTRACT ISO FILE | Vista General | |||
| Extract dll from cab file with VBScript | VB Script | |||
| Extract sound from avi file | Vista music pictures video | |||
| Extract a zip file | Vista security | |||
| extract vista I can extract vista from the iso file but can not ex | Vista General | |||