How to locate IIS log file base on date and time ?


I'm using a parser to parse IIS log files on a daily basis. Now, question is how should I know which file is today's file?  

How does IIS  generate its logs?  
As far as I know when its service is stopped or restarted it creates a new log file. am I right? if  so then how can I locate all files (related to one day) ?

Who is Participating?
pablito70Connect With a Mentor Commented:
Tried with stop/start w3svc on a W2003 server (IIS6).
Log file is the same of the day (i.e. ex140424.log) but when start w3svc, in the log you will find:

#Software: Microsoft Internet Information Services 6.0
#Version 1.0
#Date: 2014-04-24 05:17:49
#Fields: date time etc etc etc

and than all logs for W3SVC1 service.

So the file will be the same, but each time you restart the service, it will put a header as above.

Not tried with IIS7 but should be the same.

IIS log files may be stored in:


and inside W3SVC1:


In any case,open Internet Information Services (IIS), than find your website and right click and select Properties.
Go to Web tab and check for Active Log Format.

akohanAuthor Commented:
Thanks but seems you didn't read my question.
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

akohanAuthor Commented:
OK my bad! I was reading it on cell phone and didn't notice your comment.
Let me get back to you.

Thank you again.
akohanAuthor Commented:
so if server shuts down or IIS service gets restarted what happens to the log file name?
how should I distinguish which is which?

akohanAuthor Commented:
Thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.