FileSystemObject_Driver
2010-12-04 11:12
375 查看
How to get the related drive's info? Please see following:
Option Explicit Dim objFso, objDrive Dim strDrive Dim strDriveInfo strDrive = "c:" Set objFso = CreateObject("Scripting.FileSystemObject") Set objDrive = objFso.GetDrive(strDrive) 'properties '1: TotalSize --- the drive's totalsize and the unit is byte '2: AvailableSpace '3: FreeSpace --- the drive's freespace and the unit is byte '4: DriveLetter --- the drive's letter eg: c, d, e '5: DriveType --the drive's type eg: movable, stable, network, CD-ROM and RAM '6: SerialNumber '7: FileSystem--the filesystem's type eg: FAT,FAT32,NTFS etc. '8: IsReady ---Can the drive be used? '9: ShareName '10: VolumeName '11: Path--- the drive's path '12: BootFolder strDriveInfo = " TotalSize is: " & objDrive.TotalSize & Chr(13) & _ " AvailableSpace is: " & objDrive.AvailableSpace & Chr(13) & _ " FreeSpace is: " & objDrive.FreeSpace & Chr(13) & _ " DriveLetter is: " & objDrive.DriveLetter & Chr(13) & _ " DriveType is: " & objDrive.DriveType & Chr(13) & _ " SerialNumber is: " & objDrive.SerialNumber & Chr(13) & _ " FileSystem is: " & objDrive.FileSystem & Chr(13) & _ " IsReady is: " & objDrive.IsReady & Chr(13) & _ " ShareName is: " & objDrive.ShareName & Chr(13) & _ " VolumeName is :" & objDrive.VolumeName & Chr(13) & _ " Path is: " & objDrive.Path & Chr(13) & _ " RootFolder:" & objDrive.RootFolder MsgBox strDriveInfo
相关文章推荐
- 《Windows NT FileSystem Internals》学习笔记之DRIVER_OBJECT对象结构
- FileSystemObject 示例代码
- FileSystemObject
- Unable to locate JAR/zip in file system as specified by the driver definition: mysql-connector-java-
- 如何用FileSystemObject组件来做一个站内搜索?
- VB 中定义FileSystemObject对象,要先添加对象
- VBA遍历所有文件夹的两种方法(filesearch和FileSystemObject)
- ActiveX 部件不能创建对象: 'Scripting.FileSystemObject'
- asp中FileSystemObject读取csv文件乱码问题
- 用JavaScript封装下FileSystemObject,做下文件操作!
- 用 FileSystemObject 访问文件
- Scripting.FileSystemObject控件的用法
- 设计 FileSystemObject
- FileSystemObject详解
- 在使用Scripting.FileSystemObject 的时候报错automation服务器不能创建对象
- FileSystemObject 示例代码
- test code浏览和IE操作FileSystemObject
- javaScript中利用ActiveXObject来创建FileSystemObject操作文件 (转贴)
- new ActiveXObject("Scripting.FileSystemObject") 未能创建对象的解决方法
- FileSystemObject基础知识