home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / misc / 27225 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  1.5 KB

  1. Path: sparky!uunet!sun-barr!ames!pacbell.com!iggy.GW.Vitalink.COM!widener!dsinc!ub!galileo.cc.rochester.edu!troi.cc.rochester.edu!gwni
  2. From: gwni@troi.cc.rochester.edu (G. Wayne Nichols)
  3. Newsgroups: comp.os.os2.misc
  4. Subject: Re: if exist absent\nul (was: Re: null device)
  5. Message-ID: <1992Aug12.214756.26413@galileo.cc.rochester.edu>
  6. Date: 12 Aug 92 21:47:56 GMT
  7. References: <1992Aug2.220343.1841@magnus.acs.ohio-state.edu> <GHENNIGA.92Aug3125330@ampere.ampere> <1992Aug4.174622.1@cc.curtin.edu.au> <#z3m67p@lynx.unm.edu>
  8. Sender: news@galileo.cc.rochester.edu
  9. Organization: University of Rochester - Rochester, New York
  10. Lines: 24
  11. Nntp-Posting-Host: troi.cc.rochester.edu
  12.  
  13. In <#z3m67p@lynx.unm.edu> galway@chtm.eece.unm.edu (Denis McKeon) writes:
  14.  
  15. >Has anyone else noticed that a DOS batch file trick with nul: stopped
  16. >working - under DOS you could test for the existence of a directory:
  17.  
  18. >    set dir=string
  19. >    if exist %dir%\nul goto :exists
  20. >    mkdir %dir%
  21. >    cd %dir%
  22. >    pkunzip ..\%dir%.zip
  23. >    goto :exit
  24. >    :exists
  25. >    echo directory %dir% exists, cannot create
  26. >    :exit
  27.  
  28. >I haven't done exhaustive testing with script file yet, but the 
  29. >"if exist dir\nul" behavior seems to be the same under cmd.exe, 
  30. >VDM (emulated DOS) and VDB (bootable DOS image created with VMDISK).
  31.  
  32. >Is there a reasonable way to test for directory existence in a DOS 
  33. >batch file (under a VDB or a VDM)?
  34.  
  35. Just thought I'd warn you that it doesn't work in DRDOS 6.0, either.
  36. It's OK in MSDOS through 5.0, though.
  37.