Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Filter by filename in GETFILE

37 views
Skip to first unread message

freightl...@hotmail.com

unread,
Feb 8, 2007, 2:38:42 PM2/8/07
to
Hi all,

I just want to display only text files whose name matches a certain
pattern, in the GETFILE() window.

For now I have:

myfile = GETFILE("txt","","",0,"Select scan file")

I want to see ONLY those .txt files having a name starting by "MD",
possibly case unsensitive.


thanks for help

Kamran

unread,
Feb 8, 2007, 10:43:34 PM2/8/07
to
When GETFILE() dialog appears type md*.txt in "File Name" and press enter.
These files will be displayed.

Regards,

Kamran

<freightl...@hotmail.com> wrote in message
news:1170963522.8...@v45g2000cwv.googlegroups.com...

Jan Bucek

unread,
Feb 9, 2007, 11:00:00 AM2/9/07
to
I am affraid the GETFILE is not able to do it. Maybe you can use
COMBOBOX with RecordSourceType=7 - files, in this case you can use file
skeleton with * and ?

freightl...@hotmail.com napsal(a):

Christian Ehlscheid

unread,
Feb 9, 2007, 4:18:35 PM2/9/07
to
Hi,

my open source FLL library (www.vfp2c.com) provides a replacement
function for the GETFILE function that has the capability to set custom
file masks.

e.g.

&& library initialization (only needed once at application startup)
#INCLUDE vfp2c.h
SET LIBRARY TO vfp2c32.fll ADDITIVE
INITVFP2C32(VFP2C_INIT_ALL)

&& the GETFILENAME replacement function ..
LOCAL lcFile
lcFile = GETOPENFILENAME(0,"Valid Files" + CHR(0) + ;
"md*.*","","C:","Custom Title")

DO CASE
CASE VARTYPE(lcFile) = 'C'
? "File" + lcFile + " selected"
CASE lcFile = 0
? "Dialog box aborted"
CASE lcFile = -1
? "Error in dialog box."
ENDCASE

Regards
Christian

0 new messages