0

The below logparser query is returning the file names accessed from a website.

LogParser.exe -i:W3C "SELECT EXTRACT_FILENAME (cs-uri-stem) As FileName FROM c:\weblog\file1.log" -o:CSV 

Example returned:

forum.aspx
example_image.jpg
search.aspx

Can someone provide insight on how to remove the extension of the file names from within logparser?

Bondo
  • 93
  • 4
  • 8

1 Answers1

1

You can use the EXTRACT_PREFIX function to extract everything up to the last substring separated by '.':

SELECT EXTRACT_PREFIX( EXTRACT_FILENAME (cs-uri-stem), -1, '.')...
Gabriele Giuseppini
  • 1,541
  • 11
  • 19