Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

Available disk space on share (OpenInsight 32-bit Specific)

At 10 JAN 2012 10:31:03AM Paxton Scott wrote:

Greetings!

I found dspace() which does what I want when I have a mapped Drive letter. However, I want to use a share. (\\rainbow\mediafiles).

Is there a way to get the available space on a share? Or, is there a way to (within BASIC+) to map a share and then call dspace()?

Have fun,

Paxton


At 10 JAN 2012 11:21AM Jared Bratu wrote:

There are methods to map the drive letter so you can call dspace(). Another method is to use VBScript and query the share directly. Here is a BASIC+ code example that uses the Scripting.FileSystemObject control:

WScript=oleCreateInstance("ScriptControl")

OlePutProperty(wscript, "Language", "VBScript")

drvPath=\\servername\share name\" ;*Drive or Share Name to check for Freespace

;*Returns the free space of drvPath in bytes.

RetVal=WScript-]Eval('CreateObject("Scripting.FileSystemObject").GetDrive(CreateObject("Scripting.FileSystemObject").GetDriveName("' : drvPath : '")).FreeSpace')


At 11 JAN 2012 10:31AM Paxton Scott wrote:

Thanks, Jared

View this thread on the forum...