how to identify the file system type of a drive?

Discussion in 'Python' started by venutaurus539@gmail.com, Mar 16, 2009.

  1. Guest

    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.
    , Mar 16, 2009
    #1
    1. Advertising

  2. Tim Golden Guest

    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
    Tim Golden, Mar 16, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon
    Replies:
    5
    Views:
    11,113
    Scott M.
    Jan 17, 2010
  2. mh
    Replies:
    4
    Views:
    683
    Wolfgang Strobl
    May 31, 2005
  3. Tom Anderson
    Replies:
    8
    Views:
    378
    Gerrit Holl
    Sep 15, 2005
  4. Mike Joyce
    Replies:
    3
    Views:
    3,114
    Gordon Rainsford
    May 3, 2006
  5. shailesh
    Replies:
    1
    Views:
    753
    Tim Golden
    Mar 28, 2007
Loading...

Share This Page