Skip to content

dos_chkdsk

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Returns drive space statistics for the current drive or for the specified drive. Use the rtos function to convert the return values to strings if necessary.

Syntax

(dos_chkdsk [drive])

Parameters

drive

The drive name (for example, C:, D:). If not specified, the current drive is used.

Returns

A list of three real numbers indicating the total disk space, used disk space, and free disk space in bytes if successful.

nil on error.

Example

Command: (dos_chkdsk)
(1.94292e+010 1.23667e+010 7.06254e+009)

Command: (rtos (cadr (dos_chkdsk)) 2 0)
"12366708736"

Command: (dos_chkdsk "Z:")
(5.03223e+010 4.86313e+010 1.69095e+009)

Clone this wiki locally