DriveExists 方法
时间:2007-12-27 来源:不详 作者:林子
假如指定的驱动器存在则返回 True ;假如不存在则返回 False 。 织梦内容管理系统
object.DriveExists(drivespec)
copyright dedecms
参数
object
织梦好,好织梦
必选项。 应为 FileSystemObject 的名称。
内容来自dedecms
drivespec
织梦内容管理系统
必选项。 驱动器号或完整的路径说明。 dedecms.com
说明
对于可移动媒体的驱动器, 即使没有媒体 DriveExists 方法也返回 true 。 可以使用 Drive 对象的 IsReady 属性来决定驱动器是否就绪。
本文来自织梦
下面的例子说明了 DriveExists 方法的用法。
dedecms.com
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);
} 本文来自织梦
请参阅
Drive Object | Drives Collection | FileExists 方法 | FolderExists 方法 | GetDrive 方法 | GetDriveName 方法 | IsReady 属性应用于: FileSystemObject 对象
织梦好,好织梦

上一篇:FileExists 方法 下一篇:DeleteFile 方法
文章评论
共有位Admini5网友发表了评论 查看完整内容