function DirectoryExist lparameters cPath local temparray(1) return adir(temparray,cPath,'D')>0>>Hi,
>cFile=svgetfile('C:\temp','TXT') &&Select txt file from given folder > >function svgetfile > lparameters cPath,cExt > local cPath,cExt,sv_path,aa > sv_path=allt(sys(5)) + allt(sys(2003)) > if DirectoryExist(cPath) > set default to (cPath) > endif > aa=getfile(iif(empty(cExt),'',cExt)) > set default to (sv_path) > return aa > >function DirectoryExist > lparameters cPath > local a,temparray(1) > a=adir(temparray,cPath,'D') > return iif(a>0,.t.,.f.) > >>