home *** CD-ROM | disk | FTP | other *** search
- * Function: CurDrive()
- * Author: Steve Hillbourne
- * Version: Clipper Summer '87
- * Note(s): Returns the current drive letter using only
- * Clipper source code.
- *
- * Copyright (c) 1988 Nantucket Corp.
-
- FUNCTION CurDrive
- PRIVATE drive, position, row, col
- SET CURSOR OFF
- row = ROW() && Save row.
- col = COL() && Save column.
-
- RUN VOL>drive.txt && Get the drive by saving
- ** the results of DOS's VOL
- drive = MEMOREAD("drive.txt") && command to a file and
- position = AT("d", drive) + 6 && extracting the drive letter.
- drive = SUBSTR(drive, position, 1)
-
- ERASE drive.txt && Cleanup.
- SET CURSOR ON
- @ row, col SAY "" && Restore cursor position.
- RETURN (drive)