🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: aus.computers.java
2 messages
2 total messages Started by Greg Fri, 26 May 2000 00:00
how do I get a file listing?
#719
Author: Greg
Date: Fri, 26 May 2000 00:00
16 lines
1065 bytes
I want to be able to list all the files in a directory that have a certain
pattern in the filename.

For example say I have a directory that had these files:

john_results.dat
fred_results.dat
tom_result.dat
...

I know they are all going to have "_results.dat" in the filenames but how
would I go about getting a list of those files?

thanks for any help.

Greg
Re: how do I get a file listing?
#721
Author: David Crimmins
Date: Fri, 26 May 2000 00:00
25 lines
1119 bytes
Check out the list(FilenameFilter) method in the File class

HTH
David

"Greg" <gsimon@bigpond.net.au> wrote in message
news:6amX4.96$Qu.790@news-server.bigpond.net.au...
> I want to be able to list all the files in a directory that have a certain
> pattern in the filename.
>
> For example say I have a directory that had these files:
>
> john_results.dat
> fred_results.dat
> tom_result.dat
> ...
>
> I know they are all going to have "_results.dat" in the filenames but how
> would I go about getting a list of those files?
>
> thanks for any help.
>
> Greg
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads