home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / doshelp / helpsb.zoo / help / batch / if / direct.hlp < prev    next >
Encoding:
Text File  |  1989-01-01  |  1.0 KB  |  21 lines

  1. DIRECTORY EXISTENCE TESTS
  2.  
  3. As stated in the CONDITION topic, EXIST always fails for directory names, but
  4. by using a device name, an IF test can determine whether X (which may be an 
  5. environment variable, replaceable parameter, or explicit FOR loop-variable) is 
  6. a file or some type of disk name or directory. 
  7.  
  8.         CONDITION:    TRUE implies that X is:
  9.     IF EXIST X        a file
  10.     IF EXIST XNUL    a disk name, a non-existent disk name, root, a 
  11.             pathname with trailing \, or part of filename that 
  12.             ends in "NUL".
  13.     IF EXIST X.\NUL    a disk name, root, or a pathname (except ..), with or 
  14.             without a trailing \
  15.     IF EXIST X..\NUL    a disk name, pathname, or possible pathname ending in \
  16.     IF EXIST X\.\NUL    a disk name, or pathname (with or without trailing \)
  17.     IF EXIST X\..\NUL    a pathname, or possible pathname (with or without 
  18.                     trailing \)
  19.  
  20. Any device name can be used. Root (\) is not a pathname that ends in \.
  21.