Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple getfile() *.txt, *.dat

Status
Not open for further replies.

shangrilla

Programmer
Nov 21, 2001
360
US
How can I get the getfile() or something similar to show files in the following manner:

All files && show all file types
*.txt && show only .txt files
*.doc && show only .doc files

Right now I am doing this
GETFILE ('Extentions(txt,doc):txt,doc','Select File','Browse',0)


 
Try this:

cFile=getfile("Text files (*.txt):txt; Documents (*.doc):doc")

Ian
 
One piece of what may be useless and apparently undocumented knowledge is that GETFILE() can only handle a total of 255 characters in its parameters.

This can be a problem where you want to be able to select from a large number of different file types. HTH

Chris [pc2]
 
HI Shangrilla,

myFile = GETFILE("txt,doc","Txt/Doc File")
or simply..
myFile = GETFILE("txt,doc")

You should not use "*." or any ";" in above. The use of ";" in the above will bring in all files without any file extensions.
Hope this helps you :)


ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
I ended up using this:
myFile=getfile("(*.txt):txt;(*.doc):doc;(*.dat):dat")

How can I have the getfile dialogue box open with All files.

All files is there in the drop down .cbo box, but it opens up with .txt as default.
 
Dont' worry about it. I added All files *.* to the left. Now that comes up as the default. I have all files twice in the drop down menu, but oh well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top