Process files in a directory

Discussion in 'Java' started by Sharp Tool, Jun 29, 2005.

  1. Sharp Tool

    Sharp Tool Guest

    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
     
    Sharp Tool, Jun 29, 2005
    #1
    1. Advertising

  2. Hi Sharp Tool,

    Sharp Tool wrote:
    > 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


    Are you looking for java.io.File.list()?

    Ciao,
    Ingo
     
    Ingo R. Homann, Jun 29, 2005
    #2
    1. Advertising

  3. Sharp Tool wrote:
    > 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.


    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

    --
    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/
     
    Thomas Weidenfeller, Jun 29, 2005
    #3
  4. Sharp Tool

    Guest

    , Jun 29, 2005
    #4
  5. Sharp Tool

    Roedy Green Guest

    On Wed, 29 Jun 2005 13:33:16 GMT, "Sharp Tool"
    <> wrote or quoted :

    >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


    --
    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
     
    Roedy Green, Jun 30, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TJS
    Replies:
    1
    Views:
    519
    Eliyahu Goldin
    Jun 23, 2004
  2. =?Utf-8?B?QmFzIEhlbmRyaWtz?=

    Directory and files names in temporary asp.net directory

    =?Utf-8?B?QmFzIEhlbmRyaWtz?=, Jan 28, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    843
    Juan T. Llibre
    Jan 31, 2005
  3. Replies:
    1
    Views:
    585
    Evertjan.
    Sep 30, 2005
  4. KraftDiner
    Replies:
    5
    Views:
    562
    David Lewis
    Aug 13, 2006
  5. Replies:
    1
    Views:
    178
    Evertjan.
    Sep 30, 2005
Loading...

Share This Page