I am using Log Parser to parse log files. I parse a lot of files and I wanted to make a batch file that will do it for me.
I pasted my commands to a batch file, executed it, and to my surprise, it would parse the files but would not find anything.
This is content of my batch file:
When I execute it, it does not find anything:
When I executed the command from command prompt, Log Parser would find what I was looking for:
I looked around, asked a few people but no luck.
I finally found the problem.
% in Log Parser SQL query:
% represents variable in batch file, and if you take a closer look how batch file gets executed you will see that
is executed as
I changed batch file to
and now it works.