> -----Original Message-----
> From: Rugxulo [mailto:rugx...@gmail.com] 
> Sent: Friday, February 15, 2013 12:24 AM
> To: Discussion and general questions about FreeDOS.
> Subject: Re: [Freedos-user] if not exist? / Garbo's TSBAT
> 
> Hi,
> 
> On Thu, Feb 14, 2013 at 6:40 PM, dmccunney 
> <dennis.mccun...@gmail.com> wrote:
> > On Thu, Feb 14, 2013 at 7:15 PM, Ray Davison 
> <ray...@charter.net> wrote:
> >
> >> Is there something like this in FD?
> >>
> >> IF NOT EXIST X:\ZZZ MD X:\ZZZ
> >>
> >> Everything in front of the MD is ignored, and there is an error if
> >> X:\ZZZ does exist.
> >
> > IF NOT EXIST X:\ZZZ\NUL MD X:\ZZZ should do what you want.
> 
> For completeness (though someone correct me if I'm remembering
> incorrectly), this hack is a typical DOS idiom, but ...
> 
> 1). It doesn't work under WinXP's CMD.EXE (etc.)
> 2). DR-DOS' shell prefers "direxist"
> 3). 4DOS supports both "direxist" and "isdir"

I don't know about DR-DOS or 4DOS, but this DOES work in Windows XP and Windows 
7.  It's just not necessary, because IF EXISTS works for directories with or 
without the \NUL on the end.

D

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to