Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getfile() ???
Message
From
08/03/2005 09:20:54
 
 
To
08/03/2005 08:35:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00993591
Message ID:
00993611
Views:
11
>Hello All,
>
>The getfile() function is handy in coding but is there any way to force it to initially look at a specific directory?

Hi There
You can also use 'Set default' to preset starting directory.
Here is my wrapper function accepting start dir and also
targeted file extensions. Default directory is restored within function.
function svgetfile
    lparameters cPath,cExt
    local  cPath,cExt,sv_path,cFile
    sv_path=allt(sys(5)) + allt(sys(2003))
    if !directory(cPath)
        wait wind 'Directory not found'
        return ''
    endif
    set default to (cPath)
    cFile=getfile(iif(empty(cExt),'',cExt))
    set default to (sv_path)
    return cFile
Rgds++
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform