Metropoli BBS
VIEWER: existdir.bat MODE: TEXT (ASCII)
ECHO OFF
IF "%1"=="" GOTO NOPARAMS
IF NOT EXIST %1\*.* GOTO MAYBE
ECHO The directory "%1" exists and has files in it.
GOTO END
:MAYBE
IF NOT EXIST %1\NUL GOTO NOTEXIST
ECHO The directory "%1" exists, but has no files in it.
GOTO END
:NOTEXIST
ECHO The directory "%1" does not exist.
GOTO END
:NOPARAMS
ECHO SYNTAX "EXISTDIR directoryname"
:END

[ RETURN TO DIRECTORY ]