how can i store files complete path in an array with filter say *.log

M

mahesh

Hi alll,
How can i copy the location of files in the string array
using filter like *.* ,*.log or any pattern.
Thanks in advance
 
O

Oliver Wong

mahesh said:
Hi alll,
How can i copy the location of files in the string array
using filter like *.* ,*.log or any pattern.
Thanks in advance

One way would be to iterate over all files which can be considered, see
if their names match the pattern specified, and if so, do whatever it is you
wanted to do with those files/filenames.

- Oliver
 
D

DRS.Usenet

mahesh said:
Hi alll,
How can i copy the location of files in the string array
using filter like *.* ,*.log or any pattern.
Thanks in advance

Write a FileNameFilter and use it when you do your list on the
directory. You can make it an inner class if you want.

--Dale--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,270
Messages
2,571,102
Members
48,773
Latest member
Kaybee

Latest Threads

Top