sol5-2.vbs

来自「Apress - Managing Enterprise Systems Wit」· VBS 代码 · 共 13 行

VBS
13
字号
Dim objFSO, objDrive
Set objFSO = CreateObject("Scripting.FileSystemObject")
For Each objDrive In objFSO.Drives
   'check if drive is ready, 
   If objDrive.IsReady Then
      Wscript.Echo objDrive.DriveLetter & " is " & _
      Fix(((objDrive.TotalSize - objDrive.FreeSpace) _
            / objDrive.TotalSize) * 100) & "% used"
   Else
      Wscript.Echo objDrive.DriveLetter & " is not ready"
   End If
Next

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?