Subject Re: PF (x86)
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Mon, 4 Feb 2019 21:11:12 -0800
Newsgroups dbase.getting-started

On 2/4/2019 5:53 PM, Steve wrote:
> I use the code below to detect whether pf(x86) exists, but keep getting NOT found as a result even tho it is there in File Explorer.  This folder is there, and properties do not indicate hidden.  Anyone know what I am doing wrong?
>
> #define isDir(cDir) (not empty(funique(cDir+"\isdir???.???")))
> * testing.prg
> cIniDir = "C:\Program Files (x86)"
> IF isdir(cinidir)
>     msgbox("found")
> else
>      msgbox("NOT found")
> endif
> return
>

There are several functions in the dUFLP called isDir(), try, for
example this one:

#ifndef IsDir
     #define isDir(cDir) ( new array().dir( cDir+"\*.", "D" ) > 0 )
#endif


(Actually, they're all the same function, all by Jim Sare)

Tested it and it works with the folder you are testing for.

Ken

--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm