Author: Sangeeth.India | Posted on: 2/15/2009 9:53:08 PM | Views : 334

Hi,

Given below is my code to generate a .csv file using  the MS Log Parser.

 class Program
{
static void Main(string[] args)
{
string strOutput;
string strError;

Process Proc = new Process();

ProcessStartInfo StartInfo = new ProcessStartInfo();
string Argmnts = "SELECT time, c-ip, cs-method, cs-uri-stem, sc-status INTO report3.csv FROM C:\\WINDOWS\\system32\\Logfiles\\W3SVC1\\ex09*.log WHERE (cs-uri-stem LIKE '%.aspx' OR cs-uri-stem LIKE '%.asp' OR cs-uri-stem LIKE '%.html' OR cs-uri-stem LIKE '%.htm') AND (cs-uri-stem LIKE '%MountAnville%')";
StartInfo.Argum ...

Go to the complete details ...