[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
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
Medium Priority
?
2,021 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:
Meir Rivkin earned 1500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Six Sigma Control Plans
Introduction to Processes
Suggested Courses

650 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