Mega Code Archive

 
Categories / JavaScript Tutorial / MS JScript
 

Drive

File System Objects (FSO) allow you to work with folders and files. A Drive object is created using the GetDrive() method of the file system object. Properties Associated with Drive Object ItemDescription AvailableSpaceReturns amount of space available to user on the specified drive or shared network DriveLetterReturns drive letter of a physical local drive or a shared network DriveTypeReturns value indicating the type of the specified drive FileSystemReturns type of file system in use for the specified drive FreeSpaceReturns amount of free space available to user on the specified drive or shared network IsReadyReturns status the specified drive PathReturns path for a specified file, folder, or drive RootFolderReturns a Folder object representing the root folder of a specified drive SerialNumberReturns decimal serial number used to uniquely identify a disk volume ShareNameReturns shared network's name for a specified drive TotalSizeReturns total space of a drive or shared network VolumeNameSets or returns the volume name of the specified drive <html>     <script language="JScript">     <!--     var drivePath = "C:";     var fileSysObj = new ActiveXObject("Scripting.FileSystemObject");     var drive = fileSysObj.GetDrive(fileSysObj.GetDriveName(drivePath));     -->     </script>     </html>