Get the App
SLTechnology News&Howtos  ›  Development  › 

The usage of the VBS property FreeSpace

Shulou Source: shulou.com Published: 2022-06-03 19:53:50 11月12日 Update

This article mainly explains "the usage of VBS attribute FreeSpace". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian slowly and deeply to study and learn "the usage of VBS attribute FreeSpace" together!

Returns the amount of space available to the user on the specified drive or network share. Read only.

object.FreeSpace

object Expected the name of the Drive object.

description

The FreeSpace property returns essentially the same value as the Available Space property. For computer systems that support quotas, these two properties return different values.

The following code illustrates how to use the FreeSpace property:

Function ShowFreeSpace(drvPath) Dim fso, d, s Set fso = CreateObject("Scripting.FileSystemObject") Set d = fso.GetDrive(fso.GetDriveName(drvPath)) s = "Drive" & UCase(drvPath) & " - " s = s & d.VolumeName &"

" s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0) s = s & "KB"ShowFreeSpace = sEnd Function Thank you for reading, the above is the content of "Usage of VBS FreeSpace attribute", after learning this article, I believe that everyone has a deeper understanding of the usage of VBS FreeSpace attribute, and the specific usage needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

Tags: Attributes learning content space driver driver same two code name size object that is differences ideas situations articles more users knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Microsoft MariaDB Shulou Technology Huawei