Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do While Direcoty <> ""

Status
Not open for further replies.

martyc71

Programmer
Joined
Apr 9, 2004
Messages
31
Location
US
Hi all,

I was wondering how can code in java a do while loop that reads a specific directory in unix and passes each file name found within the directory to a different routine as a parameter.
 
look at java.io.File:
Code:
File f = new File ("/usr/src/linux/");
File[] f.listFiles();
From the javadocs:
Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top