Hrm ok, so this:<br><br>win32api.GetVolumeInformation(&#39;F:&#39;)<br><br>only works if your current working directory isn&#39;t somewhere on that drive (as in my example code)? The rest of the time you need to specify an additional slash or to be safe always include the os separator.
<br><br>Thanks,<br>Gus<br><br><br><div><span class="gmail_quote">On 1/10/07, <b class="gmail_sendername">Tim Roberts</b> &lt;<a href="mailto:timr@probo.com">timr@probo.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Gustavo Tabares wrote:<br>&gt;<br>&gt; I&#39;m having a problem with the code below and I&#39;m not sure if there is<br>&gt; a bug in win32api.GetVolumeInformation. There is a simple workaround,<br>&gt; but I&#39;m curious nonetheless. Any help is appreciated.
<br>&gt; ...<br>&gt; The simple workaround is to add os.sep to the F: string in the last<br>&gt; call to GetVolumeInformation; it runs properly. This also still breaks<br>&gt; if you chdir back to the local C: drive.<br><br>
It&#39;s not a bug.&nbsp;&nbsp;When in doubt, always refer to the documentation.&nbsp;&nbsp;From<br><a href="http://msdn2.microsoft.com/en-us/library/aa364993.aspx">http://msdn2.microsoft.com/en-us/library/aa364993.aspx</a>:<br><br>/&nbsp;&nbsp; lpRootPathName/
<br>&nbsp;&nbsp;&nbsp;&nbsp;[in] A pointer to a string that contains the root directory of the<br>&nbsp;&nbsp;&nbsp;&nbsp;volume to be described.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;If this parameter is NULL, the root of the current directory is<br>&nbsp;&nbsp;&nbsp;&nbsp;used. A trailing backslash is required. For example, you specify
<br>&nbsp;&nbsp;&nbsp;&nbsp;\\MyServer\MyShare as \\MyServer\MyShare\, or the C drive as &quot;C:\&quot;.<br><br>--<br>Tim Roberts, <a href="mailto:timr@probo.com">timr@probo.com</a><br>Providenza &amp; Boekelheide, Inc.<br><br>_______________________________________________
<br>Python-win32 mailing list<br><a href="mailto:Python-win32@python.org">Python-win32@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/python-win32">http://mail.python.org/mailman/listinfo/python-win32</a>
<br></blockquote></div><br>