Simple Directory problem

Discussion in 'Programmer's Corner' started by jakegwood, Dec 10, 2011.

  1. jakegwood

    Thread Starter New Member

    Apr 13, 2011
    29
    0
    Anybody have a good reference for file handling in Java?

    I have an assignment where, given a directory, I have to print all the files (excluding directories) and files within directories of that directory (etc and going deeper until all subfiles are displayed) with paths in order of last modified.

    I created the dynamic array that will hold the strings that are the paths for each file and we are allowed to use comparable for the date modified. I really just don't know how to retrieve all the files, and especially how to get those subfiles. Any good starting points?

    Thanks

    Jake
     
  2. Filox

    New Member

    Oct 11, 2011
    7
    4
  3. K7GUH

    Member

    Jan 28, 2011
    191
    23
    Quelle dommage. The DOS XCOPY command does a passable job of that task.
     
  4. jakegwood

    Thread Starter New Member

    Apr 13, 2011
    29
    0
    listFile() worked perfectly. thanks.
     
Loading...