Windows Event log file
<p>I have a program which reads a file every time and now I want to read the event log file of windows ,how can I get the location and read its contents.</p>

<p>The logs are stored in the <strong>%SystemRoot%\System32\Config</strong> directory with a .evt extension. Within the Computer Manager you can also export them to a .txt or .csv file. </p>

<p>Windows Vista/7/Server2008 location, here it is: <strong>%SystemRoot%\system32\winevt\logs</strong></p>

<p><strong>My Code is:</strong></p>

<pre><code>String fileSeperator = File.separator;
String filePath = "C:" + fileSeperator + "WINDOWS" + fileSeperator + "system32" + fileSeperator + "winevent" + fileSeperator + "logs";
System.out.println("FilePath :" + filePath);
File f = new File(filePath);
System.out.println("Is Directory :" + f.isDirectory());
</code></pre>

<p><strong>The Output:</strong></p>

<p>FilePath : <code>C:\WINDOWS\system32\winevent\logs</code></p>

<p>Is Directory :false</p>

<p>Why does it return it is not a directory?</p>
