Hi
I have a large number (~1000) of files to analyse.
These files are in a directory.
I will use Java to run a program in batch mode to analyse each of these
files.
What is the best way of going through each of them.
I can think of providing the name for each of the files to the program to
analyse, but that doesn't sound very smart.
I would like to be able to go through each file automatically like if its in
a tree structure or something.
I hope what i said make sense.
help is appreciated
Sharp
Ingo R. Homann - 29 Jun 2005 15:20 GMT
Hi Sharp Tool,
> Hi
>
[quoted text clipped - 11 lines]
> help is appreciated
> Sharp
Are you looking for java.io.File.list()?
Ciao,
Ingo
Thomas Weidenfeller - 29 Jun 2005 15:22 GMT
> I have a large number (~1000) of files to analyse.
> These files are in a directory.
[quoted text clipped - 3 lines]
> I can think of providing the name for each of the files to the program to
> analyse, but that doesn't sound very smart.
http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#list()
http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#list(java.io.FilenameFilter)
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
iksrazal@terra.com.br - 29 Jun 2005 20:41 GMT
Beyond the other comments, If you can use Java 5.0 take a look at
Coconut AIO package (Asychronous I/O) - its JSR is:
http://www.jcp.org/en/jsr/detail?id=203
Its available as a seperate package, almost made it into Java 5.0 and
has a good chance for 1.6/6.0 .
HTH,
iksrazal
http://www.braziloutsource.com/
Roedy Green - 30 Jun 2005 07:23 GMT
>I would like to be able to go through each file automatically like if its in
>a tree structure or something.
File.list( FileFilter )
See http://mindprod.com/jgloss/file.html
http://mindprod.com/jgloss/filter.html

Signature
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes