Folder exist? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Folder exist?

Hi all!

How can I do in QBasic to check
if a folder exist? Thanks a lot.

// Petsson


Comments

  • : Hi all!
    :
    : How can I do in QBasic to check
    : if a folder exist? Thanks a lot.
    :
    : // Petsson
    :
    Hi!

    Here is one way to check if a folder exists:

    ON ERROR GOTO ErrorHandler
    CHDIR "c:mydir"
    END

    ErrorHandler:
    IF ERR=76 THEN
    PRINT "Folder Doesn't exist"
    ELSE PRINT "Folder exists"
    END IF
    END


Sign In or Register to comment.