Function ShowSpaceInfo(drvpath) Dim fso, d, s Set fso = CreateObject("Scripting.FileSystemObject") Set d = fso.GetDrive(fso.GetDriveName(fs.GetAbsolutePathName(drvpath))) s = "驱动器 " d.DriveLetter ":" s = s vbCrLf s = s "总容量:" FormatNumber(d.TotalSize/1024, 0) "KB" s = s vbCrLf s = s "可用空间:" FormatNumber(d.AvailableSpace/1024, 0) "KB"ShowSpaceInfo=sEnd Function