I have an easy template system that I use. There are a number of differences that you need to learn for the input and output factors especially when doing XML or HTML formating. Here is your SQL in VBS format. remember to save as .vbs
'===================================================================================
'************************** Set Input and Output formats ******************************
Set objLogParser = CreateObject("MSUtil.LogQuery")
Set objInputFormat = CreateObject("MSUtil.LogQuery.IISW3CInputFormat")
Set objOutputFormat = CreateObject("MSUtil.LogQuery.W3COutputFormat")
'===================================================================================
'********************************* Set String inputs **********************************
strDate = Replace(Date,"/","-")
outputfile = "c:\temp\soalogs\scrub-ex" & strDate & ".log"
'===================================================================================
'******************************** Insert Query here **********************************
strQuery = "select date, time, s-sitename, s-computername, s-ip, cs-method, cs-uri-stem, cs-uri-query, s-port, cs-username, c-ip, cs(User-Agent), cs(Cookie), cs(Referer), cs-host, sc-status, sc-substatus, sc-win32-status, time-taken FROM c:\temp\logs\ex*.log WHERE cs(Referer) NOT LIKE '%weblink%' AND cs-uri-stem NOT LIKE '%/left1_%' and cs-uri-stem NOT LIKE '%pngbehavior%'"
'===================================================================================
'******************************** This calls the job **********************************
objLogParser.ExecuteBatch strQuery, objInputFormat, objOutputFormat
'===================================================================================
'*************************** Open file to read ****************************************
Set objShell = Wscript.CreateObject("Wscript.Shell")
objShell.Run outputfile
'**************************************************************************************
you do not need the Open file section except to make sure it works.
Jerome