WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

LogParser

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Fast File Search Method - LogParser


I'm researching different file search methods and today I'm trying to use LogParser. I found the following code which looks like it should return all files on the drive
;List all files in a .CSV file
dir = 'C:\*.*'
csvfile = 'C:\output.csv'
objLogParser = ObjectCreate("MSUtil.LogQuery")
objInputFormat = ObjectCreate("MSUtil.LogQuery.FileSystemInputFormat")
objInputFormat.recurse = -1 ;recurse all directories
objOutputFormat = ObjectCreate("MSUtil.LogQuery.CSVOutputFormat")
strQuery = "SELECT Name, Size INTO '":csvfile:"' from '":dir:"' ORDER BY Name ASC"
objLogParser.ExecuteBatch(strQuery,objInputFormat,objOutputFormat)
Run(csvfile,'')
objOutputFormat = 0
objInputFormat = 0
objLogParser = 0

Article ID:   W18083
Filename:   Fast File Search Method - LogParser.txt
File Created: 2008:11:25:12:41:24
Last Updated: 2008:11:25:12:41:24