Set fso = CreateObject("Scripting.FileSystemObject")
Do
WScript.StdOut.Write "\\HDC-NT-MAIL01\D$" :
strFolder = WScript.StdIn.ReadLine
If fso.FolderExists(strFolder) Then
Exit Do
Else
WScript.StdOut.Write "Invalid Directory ... Try Again" & vbCrLf
End If
Loop
"Error window box messages"
Line :4
Char:5
Error: The handle is invalid.
Code: 80070006
Source :(null)
Set f = fso.GetFolder(strFolder)
WScript.Echo f.Path & ": " & FormatNumber(f.Size,0,,TriStateTrue) & " bytes"