How can I get the total size of a folder (all objects in it) on a
remote computer? I have been looking for an example but having no luck.
-thanks!

Re: get total size of a folder (all objects in it) on a remote computer by McKirahan

McKirahan
Tue Jan 04 13:59:43 CST 2005

<emebohw@netscape.net> wrote in message
news:1104868013.641184.159540@c13g2000cwb.googlegroups.com...
> How can I get the total size of a folder (all objects in it) on a
> remote computer? I have been looking for an example but having no luck.
> -thanks!
>

Will this help? Watch for word-wrap.

Option Explicit
'*
Const cVBS = "foldsize.vbs"
Const cFOL = "C:\Temp\"
'*
Dim strSIZ
strSIZ = cFOL & " = "
'*
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Not objFSO.FolderExists(cFOL) Then WScript.Quit
Dim objGFO
Set objGFO = objFSO.GetFolder(cFOL)
strSIZ = FormatNumber(objGFO.Size,0) & " bytes"
Set objGFO = Nothing
Set objFSO = Nothing
'*
MsgBox strSIZ,vbInformation,cVBS



Re: get total size of a folder (all objects in it) on a remote computer by emebohw

emebohw
Tue Jan 04 17:21:03 CST 2005

How would I use this to check the size on a remote machine?