Re: [Freedos-user] if not exist? / Garbo's TSBAT

2013-02-16 Thread Chris Evans
Updated it, now compiles under gcc on linux
and freedos using Borland C...

http://digitalatoll.com/pub/DMSOFT/exist.zip

--
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] if not exist? / Garbo's TSBAT

2013-02-15 Thread David C. Kerber


 -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


Re: [Freedos-user] if not exist? / Garbo's TSBAT

2013-02-15 Thread dmccunney
On Fri, Feb 15, 2013 at 12:23 AM, Rugxulo rugx...@gmail.com wrote:

 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.)

It's not *needed* under 2K/XP CMD.EXE. Its IF EXIST tests for directories, too.

 2). DR-DOS' shell prefers direxist
 3). 4DOS supports both direxist and isdir

Correct.

I suppose it's *possible* to create a portable batch file that tries
to figure out what environment it's running in and does the right
thing for that environment.  I wouldn't even try.  If I need to use IF
EXIST X:\ZZZ\NUL to know if X:\ZZZ exists or must be created, it's a
special case, and I'll do the right thing for that environment.

 Timo Salmi had some good .BAT (and .CMD) FAQs back in the day. I
 should really email him to ask him for permission to mirror them (not
 sure if they are technically free/libre or not), esp. since Garbo went
 kaput. EDIT: Err, maybe not.   :-(

 http://lipas.uwasa.fi/~ts/garbo.html
 http://www.netikka.net/tsneti/info/tscmd.php

 
 An important note to Garbo repository users: The workstation hosting
 the Garbo repository at the University of Vaasa, Finland has broken
 down during 2012. The university's Computer Centre has informed me
 that it will not be replaced. Thus all the potentially remaining
 direct references to the utilities at Garbo in this FAQ are out of
 date.

It had been hosted on his personal workstation.  He retired, and it
died.  The University had funding issues, and chose not to spend the
money to replace and continue to support the machine.

 However, tscmd.zip continues to be available, now at a private ISP
 address. You may freely download it for your own, private purposes.
 But contrary to some past Garbo exceptional arrangements, I do not
 give permissions to mirroring, that is carrying my materials for
 downloading at other locations. (I am retired, fully served, since
 September 2011. I now say routinely no to all requests.)
 

 Well, no huge loss, as long as he still mirrors it online.

He is also still active in comp.os.msdos and elsewhere, and IIRC, his
FAQs are posted there.

Pity, though: Garbo mirrored a lot of old stuff besides Timo's
contributions.  They can be found elsewhere, but Timo's collection was
the first place a lot of folks looked.
__
Dennis
https://plus.google.com/u/0/105128793974319004519

--
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


Re: [Freedos-user] if not exist? / Garbo's TSBAT

2013-02-14 Thread Rugxulo
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

Timo Salmi had some good .BAT (and .CMD) FAQs back in the day. I
should really email him to ask him for permission to mirror them (not
sure if they are technically free/libre or not), esp. since Garbo went
kaput. EDIT: Err, maybe not.   :-(

http://lipas.uwasa.fi/~ts/garbo.html
http://www.netikka.net/tsneti/info/tscmd.php


An important note to Garbo repository users: The workstation hosting
the Garbo repository at the University of Vaasa, Finland has broken
down during 2012. The university's Computer Centre has informed me
that it will not be replaced. Thus all the potentially remaining
direct references to the utilities at Garbo in this FAQ are out of
date.

However, tscmd.zip continues to be available, now at a private ISP
address. You may freely download it for your own, private purposes.
But contrary to some past Garbo exceptional arrangements, I do not
give permissions to mirroring, that is carrying my materials for
downloading at other locations. (I am retired, fully served, since
September 2011. I now say routinely no to all requests.)


Well, no huge loss, as long as he still mirrors it online.

--
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


Re: [Freedos-user] if not exist? / Garbo's TSBAT

2013-02-14 Thread Chris Evans
For those that cant use the NUL trick they can use exist.exe
it will check for dir and file name and return errorlevel.



http://digitalatoll.com/pub/DMSOFT/exist.zip




--
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