Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

foldersize

Status
Not open for further replies.

glmrenard

Technical User
Oct 29, 2002
52
FR
Hello

I need to get the foldersize of a distant computer, how Can I do that using wmi and vbscript.
For a local computer I have

'Option Explicit
'Dim objFileSystem, objTheFolder

'Set objFileSystem = CreateObject("Scripting.FileSystemObject")
'Set objTheFolder = objFileSystem.GetFolder("C:\exploit")
'wscript.echo objTheFolder.size

Any idea will be appreciated !

Good eveening all !
 
Hello glmrenard,

If the remote folder is accessible via an unc path, fso will support it and get its size.
[tt]
sunc="\\a0b1c2\c$\program files"
Set objTheFolder = objFileSystem.GetFolder(sunc)
wscript.echo objTheFolder.size
[/tt]
regards - tsuji
 
Thanks, it works perfectly, quite slow but effective !

regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top