                               FYI

(Note:  The origin of this information may be internal or external to Novell. 
Novell makes every effort within its means to verify this information. 
However, the information provided in this document is FOR YOUR INFORMATION
only.  Novell makes no explicit or implied claims as to the validity of this
information.)

          TITLE:  USING THE DIREXIST COMMAND
   DOCUMENT ID#:  FYI-M-1117
           DATE:  06JAN93
        PRODUCT:  DR DOS
PRODUCT VERSION:  6.0
     SUPERSEDES:  05JUN92

        SYMPTOM:  UNABLE TO USE BATCH COMMAND IF EXIST %\NUL

  ISSUE/PROBLEM:  The command:  IF EXIST %1\NUL will no longer work with DR
DOS.

       SOLUTION:  Use the batch command DIREXIST.  There is an improved batch
file parser that actually provides a much more convenient method, the command
is:  DIREXIST %1 

ADDITIONAL REFERENCE:  DR DOS 6.0 User Guide, page 128. 



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 enhancement to batch file processing provides the same        
echo   result, but with a more consistent 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  
