how to identify the file system type of a drive?

V

venutaurus539

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..

so on..

Thank you,
Venu Madhav.
 
T

Tim Golden

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top