import java.io.*;
import java.util.*;
 

public class DirList {
  public static void main(String[] args) {
    File path = new File(".");
    String[] list = path.list();
  
    for(int i = 0; i < list.length; i++)
      System.out.println(list[i]);
  }
}
 
pass the directory name in the constructor  whose files u want to list.
 
Cheers!!
raj
-----Original Message-----
From: chenghong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 7:43 AM
To: [EMAIL PROTECTED]
Subject: does anyone how to list all files in the specific directory ?

does anyone how to capture all filename in a directory ??
 
thanks
cheng hong.

Reply via email to