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