Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


remote PC folder size

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,63866
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> remote PC folder size
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 remote PC folder size - 8/28/2008 1:00:59 AM   
  nicosi157

 

Posts: 1
Score: 0
Joined: 8/28/2008
Status: offline
Hi, I'd like to be able get remote PC folder size.
1. Remote PC is not a Domain member, so I need to point access credentials in a script, but I do not know where I need to connect using ConnectServer method...

here is part of the script:

Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer _
   (strComputer, "root\cimv2", "user_name", "pasword")

I have this connection "objSWbemServices" working but I do not know how to make it working with "Scripting.FileSystemObject"


Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFolder = objFSO.GetFolder(\\remote-PC\C$\Folder1)
Wscript.Echo objFolder.Size

thanks
 
 
Post #: 1
 
 RE: remote PC folder size - 8/28/2008 1:58:26 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: online
Use MapNetworkDrive to authenticate to the remote PC, get the folder size, then use RemoveNetworkDrive to disconnect.

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to nicosi157)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> remote PC folder size Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts