Document 1117
DIREXIST Command
06/05/92
                    Novell Desktop Systems Group

Some installation batch files will ask the user to provide a directory name
to use for their installation.  The batch file then checks to see if the
directory exists, and if not then it will create one.

DR DOS has enhanced many area, but in doing so, a new driver named NUL came
in conflict with an older methodology for checking the existance of, and
creating directories.

The command:  IF EXIST %1\NUL   will no longer work with DR DOS, however
there is an improved batch file parser that actually provides a much more
convenient method, the command is:   DIREXIST %1

See page 128 of the DR DOS 6.0 User Guide for more information.
Example:
	
@ECHO OFF
echo  Ŀ
echo   file: IFDIR.BAT                                                   
echo  
echo  .                                                                  .
echo  ͻ
echo   Testing DIREXIST directory creation from a batch file            
echo                                                                    
echo   NOTE:               IF NOT EXIST %1\NUL                          
echo                                                                    
echo   The above convention does not work with DR DOS as a device       
echo   driver called NUL has been loaded for additional functionality.  
echo                                                                    
echo   An inhancement to batch file processing provides the same        
echo   result, but with a more consistant batch file interface.         
echo                                                                    
echo  ͼ
if "%1"=="" goto oops
if DIREXIST %1 echo Directory Already Exists

IF NOT DIREXIST %1   MD %1

if DIREXIST %1 echo Directory %1 made with DIREXIST.
dir *.
exit

:oops
echo  Ŀ
echo   OOPS!:  Need a directory name to create, try:  IFDIR.BAT C:\TEST 
echo  
