Solved

Need a VBScript to check free disk space of a UNC path and return the results in GB

Posted on 2011-03-02
3
1,955 Views
Last Modified: 2012-05-11
Hello.  I need a VBscript (VBS) that will report back the free disk space (in gigabytes) of a UNC path I feed it.  I would execute the VBscript with a single argument and the argument would be the UNC path I would want to check free space.  The script would need to write the result, simply just the number, to the shell.  

For example this is how I would like to execute the vbscript:

myVBScheckDiskSpace.vbs \\server1\share

Here is an example result I am looking for:

17

I would be executing this VBScript at the command prompt.  I need this script in a quick hurry so I am assigning the maximum points.  I appreciate they help.

Thank You
0
Comment
Question by:far182
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 35017841
if you have admin rights then u can do the following as well:

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("\\<machine>\C$\Scripts")
Wscript.Echo objFolder.Size/1000000000 ''-->convert to GigaBytes
0
 
LVL 1

Author Closing Comment

by:far182
ID: 35024029
While this didn't provide everything I was looking for, you gave me the missing things I needed to get this done.  Thank you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question