How to read directory contents?

Hello Everyone,

Our process involves generating reports and saving them into some directory on the server. Later on we would want to read the contents of that directory (read all of the file names) and generate HTML file with links to these files.

How do we read the file names from that directory?

Any help will be greatly appreciated.

Thanks in advance,

Y.M.

[404 byte] By [yurkom] at [2007-9-26 3:32:55]
# 1
Use the java.io.File.listFiles methods.
schapel at 2007-6-29 12:00:56 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
I have almost the same requirements. Since you must have already implemented it, please tell me how did you read the contents and publish them? A code snippet would be extremely helpful. Thanks.
SugandhaS at 2007-6-29 12:00:56 > top of Java-index,Archived Forums,New To Java Technology Archive...