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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perltk - browse specific files from a directory

Status
Not open for further replies.

aSDDSasdas

Programmer
Jul 12, 2006
19
AT
hello everyone,

i am working on perltk where i need to browse on a directory for specific files (.sql extension).however it seems to be more complicated when i have to filter some files from these .sql files


ie for eg i have files :
test1.sql
test2.sql
test3.sql
test4.sql
test5.sql
test6.sql
test7.sql

with getOpenfile() i would like only test4.sql and test5.sql to be listed on the browse-window and not the other sql files..could anyone suggest me how to do this.. ? or if this is possible ?

thank u in advance

regards
Sonia
 
Have you tried something like... in the -filetypes array,

Code:
-filetypes => [
   [ 'Specific SQL Files', [ 'test4.sql', 'test5.sql' ]],
   [ 'All Files',            '*.*'                     ],
],

Seems like it might work, since the typical syntax is something like...

Code:
[ 'Text Documents', '*.txt'          ],
[ 'Perl Scripts',  ['*.pl', '*.cgi'] ],

So it seems like you could put something else in place of the *.

-------------
Cuvou.com | My personal homepage
Project Fearless | My web blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top