DRIVE

From STX Wiki
< Programmer Guide‎ | Command Reference
Revision as of 17:31, 18 November 2010 by Admin (talk | contribs) (1 revision: Initial import)
Jump to navigationJump to search

DRIVE

var := DRIVE [ /S ]

-> var = '1stdriveletter 2nddriveletter ...'

Get the letters (A, B, ....) of the available drives.

var := DRIVE driveLetter [sizeUnit] [ /S ]

Get the label string of the drive driveLetter.

-> var = 'drivelabel' or empty

If sizeUnit is specified, the size of the drive, the free space and the space available to the user are also returned.

-> var = 'drivelabel ; size freeall freeuser' or empty

driveLetter
The drive letter to query (e.g. A) or the file path (e.g. c:\files\test.txt) where the first letter is used.
sizeUnit
The possible values are:

B (byte) KB (kilobyte) MB (megabyte) GB (gigabyte)

/S
If specified, errors will generate warning messages rather than error messages. See The Silent Flag for details.

See the script file drive_example.sts for a working example.

Navigation menu

Personal tools