Home | Javascript validator | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Microsoft® JScript® DriveExists Method |
Scripting Run-Time Reference Version 3 |
Returns True if the specified drive exists; False if it does not.
object.DriveExists(drivespec)The DriveExists method syntax has these parts:
Part Description object Required. Always the name of a FileSystemObject. drivespec Required. A drive letter or a complete path specification.
For drives with removable media, the DriveExists method returns true even if there are no media present. Use the IsReady property of the Drive object to determine if a drive is ready.The following example illustrates the use of the DriveExists method:
function ReportDriveStatus(drv) { var fso, s = ""; fso = new ActiveXObject("Scripting.FileSystemObject"); if (fso.DriveExists(drv)) s += "Drive " + drv + " exists."; else s += "Drive " + drv + " doesn't exist."; return(s); }
Home | Javascript validator | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |