home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pcmagazi / 1989 / 06 / existdir.bat < prev    next >
DOS Batch File  |  1988-09-30  |  360b  |  16 lines

  1. ECHO OFF
  2. IF "%1"=="" GOTO NOPARAMS
  3. IF NOT EXIST %1\*.* GOTO MAYBE
  4. ECHO The directory "%1" exists and has files in it.
  5. GOTO END
  6. :MAYBE
  7. IF NOT EXIST %1\NUL GOTO NOTEXIST
  8. ECHO The directory "%1" exists, but has no files in it.
  9. GOTO END
  10. :NOTEXIST
  11. ECHO The directory "%1" does not exist.
  12. GOTO END
  13. :NOPARAMS
  14. ECHO SYNTAX "EXISTDIR directoryname"
  15. :END
  16.