home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR3 / FFG153.ZIP / DEMOBAT.ZIP / DIREXIST.BAT < prev    next >
DOS Batch File  |  1993-05-10  |  820b  |  27 lines

  1. @echo off
  2. REM
  3. REM  This batch file uses FFG to for existence of a specified directory.  If it
  4. REM  exists a message saying so is displayed.  Similarly, a message
  5. REM  states that the directory does not exist if it is not found.  It will
  6. REM  find hidden directories too.
  7. REM
  8. REM
  9. REM Notes on FFG parameters:
  10. REM 1. redirection to nul to suppress standard output:
  11. REM 2. /r prevents searching beyond the specified directory:
  12. REM %1 holds the directory to find, which must have a terminating backslash
  13. REM
  14. if %1.==. goto USAGE
  15. L:ffg>nul %1 /r
  16. if errorlevel 1 if not errorlevel 2 goto FOUND
  17.   echo Directory "%1" doesn't exist.
  18.   goto END
  19. :FOUND
  20.   echo Directory "%1" exists.
  21.   goto END
  22. :USAGE
  23.   echo USAGE:  %0 FullDirSpec\
  24.   echo.
  25.   echo         Note: You must use a trailing backslash '\'
  26. :END
  27.