Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
/* running DSpace from System Editor Command Line
   Compile this function
*/
 
function ShowDiskSize(Disk)
declare subroutine DSpace
NotUsed           = 0    ;* available space in bytes (if <2GB)
FreeClusters      = 0
SectorsPerCluster = 0
BytesPerSector    = 0
TotalClusters     = 0
DSpace(Disk, NotUsed, FreeClusters, SectorsPerCluster, BytesPerSector, TotalClusters)
AvailableBytes = FreeClusters  * SectorsPerCluster * BytesPerSector
TotalBytes     = TotalClusters * SectorsPerCluster * BytesPerSector
return AvailableBytes: " of ": TotalBytes
 
From the System Editor Command Line, to display the available space on Drive C, type the following:
 
Run ShowDiskSize "C"

 

 

Example 2

Code Block
/*  calling DSpace directly  */
declare subroutine DSpace
Disk              = "C"  ;* the drive letter
NotUsed           = 0    ;* available space in bytes (if <2GB)
FreeClusters      = 0
SectorsPerCluster = 0
BytesPerSector    = 0
TotalClusters     = 0
DSpace(Disk, NotUsed, FreeClusters, SectorsPerCluster, BytesPerSector, TotalClusters)
AvailableBytes = FreeClusters  * SectorsPerCluster * BytesPerSector
TotalBytes     = TotalClusters * SectorsPerCluster * BytesPerSector