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

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

Re: [Freedos-user] if not exist?

2013-02-15 Thread Alain Mouette
Yes, that trick works since very old MS-DOS versions ;-) Alain Em 14-02-2013 22:30, Eric Auer escreveu: Hi! If that doesn't work then a exist.c should be made that friend 1 errorlevel if so let me know and I make it You misunderstood, IF EXIST does exists but has to be used in a special

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

[Freedos-user] if not exist?

2013-02-14 Thread Ray Davison
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. TY Ray -- Free Next-Gen Firewall Hardware Offer Buy your Sophos

Re: [Freedos-user] if not exist?

2013-02-14 Thread Chris Evans
If that doesn't work then a exist.c should be made that friend 1 errorlevel if so let me know and I make it On Feb 14, 2013 4:17 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

Re: [Freedos-user] if not exist?

2013-02-14 Thread Eric Auer
Hi! If that doesn't work then a exist.c should be made that friend 1 errorlevel if so let me know and I make it You misunderstood, IF EXIST does exists but has to be used in a special way for directory checks ;-) Is there something like this in FD? Yes of course: Type if /? to see how it

Re: [Freedos-user] if not exist?

2013-02-14 Thread Chris Evans
Here is a program you can call from batch file http://digitalatoll.com/pub/DMSOFT/exist.zip exist X:\ZZZ if errorlevel 0 goto itexists echo it doesnt exist goto end :itexists echo it exists! :end On 02/14/2013 04:15 PM, Ray Davison wrote: Is there something like this in FD?

Re: [Freedos-user] if not exist?

2013-02-14 Thread Alain Mouette
try this: IF NOT EXIST X:\ZZZ\NUL MKDIR X:\ZZZ Alain Em 14-02-2013 22:15, Ray Davison escreveu: 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. TY Ray

Re: [Freedos-user] if not exist?

2013-02-14 Thread Ray Davison
Eric Auer wrote: Yes of course: Type if /? to see how it should work. I wondered thru the batch area but did not try that. IF NOT EXIST X:\ZZZ\NUL MKDIR X:\ZZZ OK that works. TY Ray -- Free Next-Gen Firewall

Re: [Freedos-user] if not exist?

2013-02-14 Thread dmccunney
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 EXIST works for files, but not directories. The check for the

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

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

Re: [Freedos-user] if not exist MD XXX

2011-05-14 Thread Christian Masloch
Hey, if not exist mydir/nul md mydir Doesn't work on XP (I think?), but that's the typical DOS way. This kept bothering me for some reason, so I checked now. It appears to work just fine on MSW NT command lines, executing the command after if not exist dir\nul if and only if that directory

Re: [Freedos-user] if not exist MD XXX

2011-05-14 Thread Eric Auer
Hi Christian, if not exist mydir/nul md mydir Doesn't work on XP (I think?), but that's the typical DOS way. This kept bothering me for some reason, so I checked now. It appears to work just fine on MSW NT command lines, executing the command after if not exist dir\nul if and only if

Re: [Freedos-user] if not exist MD XXX

2011-05-14 Thread Christian Masloch
Hi Eric, As far as I remember, the DOS findfirst API is supposed to find character devices (such as NUL) in any (existing) directory, so this would depend more on DOS than on COMMAND, but I am not sure. Without any further investigation, I'd say that's part of it. However, aside from the

[Freedos-user] if not exist MD XXX

2011-05-12 Thread Ray Davison
Is there such a batch command? Ray -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help