0

Can we escape semicolon (;) or comma (,) in log parser query? Because I want to query a file which is having ';' in file path. For example If I query a file which is placed under the folder named "ab;c"

C:\Program Files (x86)\Log Parser 2.2>LogParser -i:CSV "select * from 'G:\ab;c\123.csv'"

getting the below error

Error: Error opening files: Error opening file "G:\ab": The system cannot find the file specified.

The folder path is getting terminated with the occurrence of semicolon or comma. I have tried with replacing the character with Unicode, but still the same result. Is there any solution? or is it a limitation ?

Thanks in advance

user2173005
  • 45
  • 2
  • 5

2 Answers2

0

If you are using Log Parser Studio and try to query semicolon separated values, Use the TSV input format instead - you can use -iSeparator:; for this.

See this thread

Carlos
  • 361
  • 3
  • 7
-1

Semicolon and comma are both used as the path separator when parsing multiple CSV files. To include them in a path, just surround the entire path in single quotes. I'm not sure which single-quote character you're using, but for me it works:

logparser -i:CSV "select * from 'c:\ab;c:\123.fag'"
Error: Error opening files: Cannot find file "c:\ab;c:\123.fag"
Gabriele Giuseppini
  • 1,541
  • 11
  • 19