Hi,
I am running logparser, in a vbs script using the logparser object.
The vbs file that runs logparser is below. It places all the files of a folder (recursing) and places them in a text file.
=============================================
Dim objLogParser, objInputFormat, objOutputFormat, strQuery
Set objLogParser = CreateObject("MSUtil.LogQuery")
Set objInputFormat = CreateObject("MSUtil.LogQuery.FileSystemInputFormat")
Set objOutputFormat = CreateObject("MSUtil.LogQuery.TSVOutputFormat")
strQuery = "SELECT Name, Size INTO 'C:\Ed's Scripts\Output2.txt' FROM 'C:\Tom's Scripts\Before*.*' ORDER BY Name ASC"
objLogParser.ExecuteBatch strQuery, objInputFormat, objOutputFormat
Apparently Log Parser cannot handle the apostrophe.
=============================================
How can I escape any apostrophes in my strQuery?
(Unfortunately my computer is loaded with folder names with apostrophes I am using XP, and this is the first brick wall I have hit on this subject.)
In the help file, it says you should be able to escape the apostrophe.
Like (?):
strQuery = "SELECT Name, Size INTO 'C:\Ed\'s Scripts\Output2.txt' FROM 'C:\Tom\'s Scripts\Before*.*' ORDER BY Name ASC"
But LogParser does not understand that the backslash is "escaping the apostrophe".
Am I escaping incorrectly?
I have tried escaping with unicode (U0027) also.
I have tried everything I can think of. Any help would be greatly appreciated!!!!!!!
Other than this big obstacle, I am thrilled with the potential of log parser for me !!!!!
Thanks, Ed