Page 1 of 1 1
Topic Options
#204919 - 2012-04-23 07:49 PM If Exist (Like)...Possible?
KIXKicks Offline
Starting to like KiXtart

Registered: 2002-07-26
Posts: 177
Loc: Vancouver, WA
Is it possible to have If Exist command check more like a like?

For example,

 Code:
If Exist ("%ProgramFiles(X86)%\Microsoft Office\Office14")


I would like something like where Office* instead of Office14.

Or

 Code:
If Exist Like ("%ProgramFiles(X86)%\Microsoft Office\Office*")


Edited by KIXKicks (2012-04-23 07:50 PM)

Top
#204920 - 2012-04-23 08:10 PM Re: If Exist (Like)...Possible? [Re: KIXKicks]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not sure about like, but exist() supports wildcards.
_________________________
!

download KiXnet

Top
#204921 - 2012-04-23 08:14 PM Re: If Exist (Like)...Possible? [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
for example, I know I have common files in my program files.
this snippet verifies I don't have folder named "common" but something that starts with "common":
 Code:
[postprep]if exist("c:\program files\common")
 "common exists" ?
endif
if exist("c:\program files\common*")
 "common* exists" ?
endif

get $
_________________________
!

download KiXnet

Top
#204927 - 2012-04-23 10:04 PM Re: If Exist (Like)...Possible? [Re: Lonkero]
KIXKicks Offline
Starting to like KiXtart

Registered: 2002-07-26
Posts: 177
Loc: Vancouver, WA
Lonkero,

Thanks, that works!!!

Top
Page 1 of 1 1


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

Who's Online
1 registered (mole) and 494 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.054 seconds in which 0.027 seconds were spent on a total of 13 queries. Zlib compression enabled.

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