Javascript FileSystem property of Drive object returned by the GetDrive method of FileSystemObject returns the name of the file system of specified drive or network shared drive. FileSystem property returns the name of the file system according to the drive specified for example it returns CDFS for the CD-Rom drive only if it is in ready state that means there is a CD inside the CD drive. FileSystem property of FSO Drive object returns FAT or FAT32 if the specified DriveType is a fixed drive based on the Operating system such as Windows 98, Window XP etc. Following are the different types of results of FileSystem property of FSO drive object:
NTFS: for NT based platforms such as Windows Server OS, Windows XP.
FAT or FAT32: any type Operating System that supports FAT file system such as Windows 9x, Windows XP or Server.
CDFS: for CD drives.
Example of Javascript Drive Object FileSystem property
<script type="text/javascript">
// initialize ActiveXObject and create an object of Scripting.FileSystemObject.
var fso = new ActiveXObject("Scripting.FileSystemObject");
// Drive object reference set to driveObj variable
var driveObj = fso.GetDrive("C");
// returns File System of specified drive such as FAT, NTFS
document.write("<b>File System :</b> " + driveObj.FileSystem);
document.write("<br />");
document.write("<b>File System :</b> "
+ fso.GetDrive("\\\\my-PC\\E").FileSystem);
// Output:
// File System : NTFS
// File System : FAT
</script>
Continue to next tutorial: Javascript FSO Drive Object FreeSpace property to learn how get the information about free space on the specified drive.