|
VBS脚本应用-根据磁盘空间删除指定文件夹(2) End If On Error GoTo 0 End If End If Next
Dim strMmg,keyDrv,i strMmg = "完成报告:"&vbCrLf&vbCrLf keyDrv = dicDrvState.Keys For i = 0 To dicDrvState.Count -1 strMmg = strMmg & keyDrv(i)&" 盘剩余空间 "&dicDrvState(keyDrv(i))&" " If dicDrvState(keyDrv(i)) < FormatNumber(intLessthan) Then strMmg = strMmg & "注意!" strMmg = strMmg & vbCrLf Next MsgBox strMmg,64,"完成报告" Set dicDrvState = NoThing Set objFso = NoThing WScript.quit Function GetFreeSpace(drvPath) Dim fso, d Set fso = CreateObject("Scripting.FileSystemObject") On Error Resume Next Set d = fso.GetDrive(fso.GetDriveName(drvPath)) If Err Then err.Clear Msgbox "不能找到驱动器 “"&drvPath&"” 按确定继续",16,"错误" GetFreeSpace = "Error" Exit Function End If On Error GoTo 0 GetFreeSpace = FormatNumber(d.FreeSpace/1048576, 0) Set fso = Nothing End Function
Function Ask(strAction) Dim intButton
|