Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - curdrive() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CURDRIVE()
 Evaluates the currently active default drive.
 Returns <expC> current drive as uppercase letter.

 * Does current drive have enough space
 * available to save file in current work area?
 m_drive = CURDRIVE()

 m_write = .T.
 DO WHILE DISKSPACE(ASC(m_drive) - 64)) < ;
          ((RECSIZE() * LASTREC()) + HEADER())
    m_write = .F.
    ? "Insufficient disk space to write file"
    ? "Enter alternate drive to write file to: "
    m_drive = " "
    @ ROW(), COL() GET m_drive PICTURE "!"
    READ
 ENDDO

 IF m_write   && not enough space available
    USE       && close files when no longer needed
 ELSE
    m_target = m_drive + ":TEMPFILE"
    COPY TO &m_target
    ZAP
 ENDIF


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: CURDIR() ISDRIVE() ISFIXED()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson