Re: How to get the size of a mounted volume?
- From: "asdf" <asdf@xxxxxxxx>
- Date: Thu, 19 Jul 2007 02:30:44 -0400
Plain vanilla question and answer.
-----------------
Good Luck.
As Keith Olbermann [msnbc] usually says in his desire
not getting hanged after his nightly interpretation of US
computer users affairs.
"cml9076" <cml9076@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:FEF22790-2F6B-4E10-8320-A3168B6F54C2@xxxxxxxxxxxxxxxx
All
I have written a script that goes through all the disks on our file servers
and exports to a csv file the size of the disk and the amount of free space
on the disk. For all the volumes on these servers that are mounted directly
to a drive letter this script works great. The problem comes when I need to
find out the size of a disk volume that is mounted to a folder on a seperate
NTFS volume. For example, there is an X: drive that is 200 GB in size and my
script has no problem getting that info. But, on that X: drive there is a
folder called "mount-point-A" and there is another 200 GB volume mounted to
that folder that my script can't read. It doesn't see X: as being 400 GB
(which is good) but it doesn't see "mount-point-A" as being a sepearte 200 GB
volume.
Here is the code I'm using. Is there an object to get the info from these
mount points?
'Where sDrivePath(z) is a path to a volume that I want to get info on
Set oDrives =
oFSO.GetDrive(oFSO.GetDriveName(oFSO.GetAbsolutePathName(sDrivePath(z))))
'the following just formats the output
sTotalSize = FormatNumber(((oDrives.TotalSize/1024)/1024)/1024, 2)
sFreeSpace = FormatNumber(((oDrives.FreeSpace/1024)/1024)/1024, 2)
Thanks in advance for your help.
.
- Prev by Date: Re: How to run multiple programs in one script
- Next by Date: Re: Script to set IIS Virtual Directory security?
- Previous by thread: Re: Rundll32 printui.dll problem
- Next by thread: RE: Retrieving Custom Document Props from closed PPT presentation
- Index(es):
Relevant Pages
|