Login | |
|
 |
RE: Free space of folders on a mapped network drive - 9/3/2008 10:55:22 AM
|
|
 |
|
| |
DiGiTAL.SkReAM
Posts: 1184
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
|
Do a search. Why should we take the time to help when you won't take the time to search?
_____________________________
"Would you like to touch my monkey?" - Dieter (Mike Meyers) "It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury
|
|
| |
|
|
|
 |
RE: Free space of folders on a mapped network drive - 9/7/2008 9:22:08 PM
|
|
 |
|
| |
nol
Posts: 5
Score: 0
Joined: 9/2/2008
Status: offline
|
Hi, I have the following script but... NetworkDrive = "G:\TEST" Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & NetworkDrive & "\root\cimv2") Set colDiskDrives = objWMIService.ExecQuery ("Select * from Win32_PerfFormattedData_PerfDisk_LogicalDisk Where " & "Name <> '_Total'") For Each objDiskDrive in colDiskDrives Wscript.Echo "Drive Name: " & objDiskDrive.Name Wscript.Echo "Free Space: " & objDiskDrive.FreeMegabytes Next ... appears the following message: "The remote server machine does not exist or is unavailable: GetObject" How can I solve this? Thanks!
|
|
| |
|
|
|
 |
RE: Free space of folders on a mapped network drive - 9/8/2008 2:36:10 AM
|
|
 |
|
| |
nol
Posts: 5
Score: 0
Joined: 9/2/2008
Status: offline
|
Dear chiltz, Thanks for your answer and sample... When I try to run your script appears the following message: "Object doesnīt support this property or method:"FreeSpace"... Itīs possible to do it in another way? Thanks
|
|
| |
|
|
|
 |
RE: Free space of folders on a mapped network drive - 9/8/2008 4:54:20 AM
|
|
 |
|
| |
dm_4ever
Posts: 2669
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
quote:
ORIGINAL: nol Dear all, I have a several mapped network drives... In those drivers I have a few folders that I would like know the free space. Can anyone help me with some code to get this information? Thanks in advance! one thing to keep in mind....if you're trying to get the free space of a folder you are mapping to and it has quotas enabled....it may not necessarily show you the free space remaining for your quota but the entire free space for the disk that that folder resides in.....Windows 2003 R2 has better control of quotas and may display properly...though I haven't tried yet.
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|