Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to prompt out a dialog box for user to get in the fi
Message
From
25/01/2011 15:49:31
 
 
To
25/01/2011 15:40:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01497301
Message ID:
01497389
Views:
62
Hi Srdjan,

Why not use the Directory() function? And I guess you know this, but there's never a need for a construct like iif(SomeFunction,.T.,.F.), a simple SomeFunction will give the same result. So I would prefer to simplify the DirectoryExist function
function DirectoryExist
    lparameters cPath
    local temparray(1)
return adir(temparray,cPath,'D')>0
>>Hi,
>>Sorry, I can't find the start directory option,
>>can you give me some example ?
>
>Here is wrapper for GetFile() which lets you set start folder/extension and then
>consecutively restores current folder.
>
>
>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.)
>
>
>
>HTH
>Sergio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform