<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!-- body{padding:1ex;margin:0;font-family:sans-serif;font-size:small}a[href]{color:-moz-hyperlinktext!important;text-decoration:-moz-anchor-decoration}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em}blockquote blockquote{border-color:#006312}blockquote blockquote blockquote{border-color:#540000} --></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div>
<div>
Wondering if any of you have stumbled across the following behavior:</div>
<div>
</div>
<div>
I'm doing a recursive directory listing of my Windows folder and I can access the timestamps and file sizes of all files except the following 6 files:</div>
<div>
</div>
<div>
In the \windows\microsoft.net\framework\v2.0.50727\config folder:</div>
<div>
</div>
<div>
enterprisesec.config.cch.6824.14057640<br />
security.config.cch.6824.14057640</div>
<div>
</div>
<div>
In the \windows\\microsoft.net\framework64\v2.0.50727\config folder:</div>
<div>
</div>
<div>
\enterprisesec.config.cch.4412.14151427<br />
enterprisesec.config.cch.6912.14056844<br />
security.config.cch.4412.14151427<br />
security.config.cch.6912.14056844<br />
</div>
<div>
When I attempt to do any of the following on the above files, a WindowsError exception is raised with a value of "[Error 5] Access is denied: ...".</div>
<div>
</div>
<div>
os.path.getctime()</div>
<div>
os.path.getatime()</div>
<div>
os.path.getmtime()</div>
<div>
os.path.getsize()</div>
<div>
</div>
<div>
What's strange is that the DIR command from a cmd prompt returns timestamps and file sizes for the above files.</div>
<div>
</div>
<div>
Background; 64-bit Windows 7; 32-bit Python 2.7.2</div>
<div>
</div>
<div>
Any ideas on how I can retrieve timestamps and file sizes like DIR without raising exceptions?</div>
<div>
</div>
<div>
Thank you,</div>
<div>
Malcolm</div>
<div>
</div>
</div>
<div>
</div>
</div></body></html>