Determine the File System Type

Determine the File System Type

With the advent of the FAT32 file system, you might want to use VB to determine the type of file system being used for a particular drive. This example is set for the C drive; change the variable sDrive to test other drives. Run this routine; the variable sResult contains the file system name string:

 Private Declare Function GetVolumeInformation _	Lib "kernel32" Alias "GetVolumeInformationA" _	(ByVal lpRootPathName As String, ByVal _	lpVolumeNameBuffer As String, ByVal _	nVolumeNameSize As Long, _	lpVolumeSerialNumber As Long, _	lpMaximumComponentLength As Long, _	lpFileSystemFlags As Long, ByVal _	lpFileSystemNameBuffer As String, ByVal _	nFileSystemNameSize As Long) As LongPublic Function WhichFileSystem(ByVal Drive _	As String) As String	Dim sVolBuf As String * 255	Dim sSysName As String * 255	Dim lSerialNum As Long	Dim lSysFlags As Long	Dim lComponentLength As Long	Dim lRes As Long	lRes = GetVolumeInformation(Drive, sVolBuf, _		255, lSerialNum, lComponentLength, _		lSysFlags, sSysName, 255)	If lRes Then		WhichFileSystem = Left$(sSysName, _			InStr(sSysName, Chr$(0)) - 1)	Else		WhichFileSystem = ""	End IfEnd Function
Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular