how to identify the file system type of a drive?
Tim Golden
mail at timgolden.me.uk
Mon Mar 16 11:06:53 EDT 2009
venutaurus539 at gmail.com wrote:
> hi all,
> Is there any way to identify the File system type of a drive
> in python in Windows? Some thing like:
>
> C:\ -- NTFS
> D:\ -- FAT32..
<code>
import win32api
import win32file
def file_system (drive_letter):
return win32api.GetVolumeInformation (
win32file.GetVolumeNameForVolumeMountPoint (
"%s:\\" % drive_letter
)
)[4]
print file_system ("C")
</code>
TJG
More information about the Python-list
mailing list