Drive 对象
提供对磁盘驱动器或网络共享的属性的访问。
说明
以下代码举例说明如何使用 Drive 对象访问驱动器的属性:
Function ShowFreeSpace(drvPath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(drvPath))
s = "驱动器 " & UCase(drvPath) & " - "
s = s & d.VolumeName & "<BR>"
s = s & "可用空间: " & FormatNumber(d.FreeSpace/1024, 0)
s = s & "KB"
ShowFreeSpace = s
End Function
vbscript:Drive 对象
原创文章如转载,请注明:转载自悠悠博客 [ http://www.ajaxstu.com/ ]
相关文章:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
