Reading a directory

Discussion in 'Java' started by jack.smith.sam@gmail.com, Oct 6, 2006.

  1. Guest

    Hi All,

    I have a folder with lots of file. Is there any way that I read each
    file of this folder using Java?

    Thanks
    , Oct 6, 2006
    #1
    1. Advertising

  2. wrote:
    ....
    > I have a folder with lots of file. Is there any way that I read each
    > file of this folder using Java?


    Sure, you can make a File from a folder. Look closely
    at the File methods for your answer.

    Andrew T.
    Andrew Thompson, Oct 6, 2006
    #2
    1. Advertising

  3. writes:

    > I have a folder with lots of file. Is there any way that I
    > read each file of this folder using Java?


    The main class to do with file names is java.io.File. It has
    a method for getting the names of the files in a directory
    as File[], among other things.
    Jussi Piitulainen, Oct 6, 2006
    #3
    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:
    503
    Eliyahu Goldin
    Jun 23, 2004
  2. Jack Wright
    Replies:
    1
    Views:
    460
    sonikchopra
    Apr 19, 2005
  3. =?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:
    822
    Juan T. Llibre
    Jan 31, 2005
  4. Steve Singer
    Replies:
    0
    Views:
    528
    Steve Singer
    Feb 15, 2005
  5. davidw
    Replies:
    2
    Views:
    542
    Brock Allen
    May 30, 2005
Loading...

Share This Page