How to check the file system of drive

Jayalakshmi
Jayalakshmi used Ask the Experts™
on
Hi  
  How to check the filesystem (FAT16/FAT32 etc) of a drive? And how to check the free memory available on a disk?

Jayalakshmi
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You can use the API GetVolumeInformation for getting the file system type.

 

 

        char szVolumeName[1000];
        char dxSystemName[1000];
        DWORD dwSerialNumber;
        DWORD dwFileNameLength;
        DWORD dwFlags;
 
        GetVolumeInformation(
               "C:\\",
               szVolumeName,
               1000,
               &szSerialNumber,
               &dwFileNameLength,
               &dwFlags,
               szSystemName,
               1000);
 

 

            GOOD LUCK
Use GetDiskFreeSpaceEx to get the available free space:
ULARGE_INTEGER free_bytes_to_caller, total_bytes, total_free_bytes;
  GetDiskFreeSpaceEx("c:\\", &free_bytes_to_caller, &total_bytes, &total_free_bytes);

ULARGE_INTEGER contains a QuadPart accessor that is actually an __int64.
Commented:
PAQed - no points refunded (of 20)

GhostMod
Community Support Moderator

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial