set FSO = CreateObject("Scripting.FileSystemObject")
'Display all drives and their properties
set ds = FSO.Drives
WScript.Echo "List of drives:"
for each d in ds
WScript.Echo ""
WScript.Echo "Drive Letter = " & d.DriveLetter
WScript.Echo "Type = " & d.DriveType
WScript.Echo "Ready = " & d.IsReady
WScript.Echo "Path = " & d.Path
WScript.Echo "Share Name = " & d.ShareName
if d.IsReady then
Details = "File System = " & d.FileSystem _
& ", Serial = " & d.SerialNumber _
& ", Volume = " & d.VolumeName _
& ", Size = " & d.TotalSize _
& ", Free = " & d.FreeSpace
WScript.Echo Details
end if
next
'Display all drives and their properties
set ds = FSO.Drives
WScript.Echo "List of drives:"
for each d in ds
WScript.Echo ""
WScript.Echo "Drive Letter = " & d.DriveLetter
WScript.Echo "Type = " & d.DriveType
WScript.Echo "Ready = " & d.IsReady
WScript.Echo "Path = " & d.Path
WScript.Echo "Share Name = " & d.ShareName
if d.IsReady then
Details = "File System = " & d.FileSystem _
& ", Serial = " & d.SerialNumber _
& ", Volume = " & d.VolumeName _
& ", Size = " & d.TotalSize _
& ", Free = " & d.FreeSpace
WScript.Echo Details
end if
next
No comments:
Post a Comment