【软件自动化测试-QTP实战技能 12】== QTP 返回磁盘 freeSpace

 

    Dim fso, d, s

   drvPath="c:/"

   Set fso = CreateObject("Scripting.FileSystemObject")

   Set d = fso.GetDrive(fso.GetDriveName(drvPath))

   s = "Drive " & UCase(drvPath) & " - "

   s = s & d.VolumeName   & "<BR>"

   s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)

   s = s & " Kbytes"

   ShowFreeSpace = s



   msgbox ShowFreeSpace

你可能感兴趣的:(【软件自动化测试-QTP实战技能 12】== QTP 返回磁盘 freeSpace)