亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

vbs判斷磁盤類型和檢測硬盤剩余空間的實(shí)現(xiàn)代碼

 更新時間:2016年10月11日 22:44:29   投稿:mdxy-dxy  
這篇文章主要介紹了vbs判斷磁盤類型和檢測硬盤剩余空間的實(shí)現(xiàn)代碼,需要的朋友可以參考下

核心代碼:

Function ShowDriveType(drvpath)
  Dim fso, d, t
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set d = fso.GetDrive(fso.GetDriveName(drvpath))
  Select Case d.DriveType
   Case 0 t = "Unknown"
   Case 1 t = "Removable"  '移動硬盤
   Case 2 t = "Fixed"    '硬盤
   Case 3 t = "Network"   '網(wǎng)絡(luò)硬盤
   Case 4 t = "CD-ROM"
   Case 5 t = "RAM Disk"   'RAM
  End Select
  ShowDriveType = "Drive " & d.DriveLetter & ": - " & t
End Function
 
Function ShowFreeSpace(drvPath) 
 Dim fso, d, s
 Set fso = CreateObject("Scripting.FileSystemObject")
 Set d = fso.GetDrive(fso.GetDriveName(drvPath))    'd為F:
 s = "Drive " & UCase(drvPath) & " - "
 s = s & d.VolumeName & " "
 s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)
 s = s & " KBytes"
 ShowFreeSpace = s
End Function
 
Dim message
 
message = ShowDriveType("F:\Programming\Applications")
MsgBox message
message = ShowFreeSpace("F:\Programming\Applications")
MsgBox message

相關(guān)文章

最新評論