Page 2 of 2 <12
Topic Options
#26101 - 2002-07-30 11:31 PM Re: Check if folder exists
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Badboii,

tried earlier posted code at work:
code:
Break on CLS
If Exist("e:\y\nul") <> 0
? "Y exists"
Else
? "Y missing"
EndIf

On W2kPro SP2 with Kix4.10a

*****

At home tried following:
code:
Break on CLS
:chk
If Exist("e:\y\nul") = 0
? "Y missing, creating it..."
MD "e:\y"
Goto "chk"
Else
? "Y exists"
EndIf

On WinXp with Kix4.10a

if Dir y didn't exist, first run gives:
  • Y missing, creating it...
  • Y exists
second run gives:
  • Y exists
*****

So it seems to work... what code did yuu try???

[ 31 July 2002, 00:07: Message edited by: MightyR1 ]
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#26102 - 2002-07-31 10:14 AM Re: Check if folder exists
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Testers needed,

Can anyone else test the exist("dir2find\nul") in my earlier post?

Running Kix4.10a
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#26103 - 2002-07-31 02:33 PM Re: Check if folder exists
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
KiXtart 4.02, 4.10a, and 4.11 beta running
code:
if exist('c:\winnt')
? 'c:\winnt exist'
else
? 'c:\winnt does not exist'
endif
if exist('c:\winnt\')
? 'c:\winnt\ exist'
else
? 'c:\winnt\ does not exist'
endif
if exist('c:\winnt\nul')
? 'c:\winnt\nul exist'
else
? 'c:\winnt\nul does not exist'
endif

results in otuput:
code:
c:\winnt exist
c:\winnt\ exist
c:\winnt\nul exist



[ 31 July 2002, 14:34: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#26104 - 2002-07-31 02:36 PM Re: Check if folder exists
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it should work as adding nul after anything is just anything.
so computer does not see any difference with:
dir c:\
and
dir c:\nul

nul is kindof void. you can address stuff to it which is sucked to nowhere.
but trying to read it returns nothing.
_________________________
!

download KiXnet

Top
Page 2 of 2 <12


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.104 seconds in which 0.089 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org