Programmer Guide/Command Reference/DRIVE: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
Without an argument, the <code>DRIVE</command> retrieves list of available drive letters, separated by blanks:
Without an argument, the <code>DRIVE</code> command retrieves list of available drive letters, separated by blanks:
  var := DRIVE [ [[Programmer_Guide/Command_Reference_Options/Silent|/Silent]] ]
  var := DRIVE [ [[Programmer_Guide/Command_Reference_Options/Silent|/Silent]] ]



Revision as of 18:20, 23 March 2011

Without an argument, the DRIVE command retrieves list of available drive letters, separated by blanks:

var := DRIVE [ /Silent ]

Supplied with a drive letter as its argument, the DRIVE command will return the disk label of the respective drive:

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

If sizeUnit is specified, the size of the drive, the free space and the space available to the user are also returned in the format drivelabel ; size freeall freeuser

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), and GB (gigabyte).
/Silent
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