Platforms to show: All Mac Windows Linux Cross-Platform

FolderItem.VolumeFreeSizeMBS as Int64
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Files MBS Util Plugin Yes Yes Yes Yes No
Function: Returns the size of the free space of the volume which the folderitem objects points to.
// 1. a short:
msgBox "The volume with your system folder has "+str(specialfolder.system.VolumeFreeSizeMBS)+" Bytes free."
// 2. a nicer:
dim d as Double
dim s as string


if d>10000.0 then
if d>10000000.0 then
if d>10000000000.0 then
s=format(d/1024.0/1024.0/1024.0,"0")+" GigaBytes"
s=format(d/1024.0/1024.0,"0")+" MegaBytes"
end if
s=format(d/1024.0,"0")+" KiloBytes"
end if
s=format(d,"0")+" Bytes"
end if

msgBox "On your drive with the system folder you have "+s+" free."
This should be used to handle any volume size.
Return value changed in version 10.0 from double to SInt64.

Added Linux support in version 16.0.
Returns -1 on error.

Some examples using this method:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Util Plugin.

The biggest plugin in space...

MBS Xojo Chart Plugins