• The function Hb_DiskSpace() does not work

    From reinaldohf@gmail.com@21:1/5 to All on Thu May 18 19:59:24 2023
    Hi all,

    // ---------------------------------------------------------------------------------------------//
    #include "Fileio.ch"

    PROCEDURE Main
    LOCAL cDrive, i, bError := ErrorBlock( {|e| Break(e) } )

    FOR i:=1 TO 26
    cDrive := Chr(64+i)
    ? cDrive+":"
    BEGIN SEQUENCE
    ?? HB_DiskSpace( cDrive, HB_DISK_FREE ), ;
    HB_DiskSpace( cDrive, HB_DISK_TOTAL)
    RECOVER
    ?? " not ready or not existent"
    END SEQUENCE
    NEXT

    ErrorBlock( bError )
    RETURN
    // ------------------------------------------------------------------------------------//

    Thanks,

    Reynaldo Henrique

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Fri May 19 12:42:14 2023
    The colon is required:

    #include "Fileio.ch"

    PROCEDURE Main
    LOCAL cDrive, i, bError := ErrorBlock( {|e| Break(e) } )

    FOR i:=1 TO 26
    cDrive := Chr(64+i)+":"
    ? cDrive
    BEGIN SEQUENCE
    ?? HB_DiskSpace( cDrive, HB_DISK_FREE ), ;
    HB_DiskSpace( cDrive, HB_DISK_TOTAL)
    RECOVER
    ?? " not ready or not existent"
    END SEQUENCE
    NEXT

    ErrorBlock( bError )

    RETURN

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From reinaldohf@gmail.com@21:1/5 to All on Fri May 19 14:21:54 2023
    The colon is required:

    Now It works good!

    Thank you very much for you help!

    Reynaldo Henrique

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)