public class TXT {
public static void main(String[] args) {
File file=new File("D:\\");
showfile(file);
}
public static void showfile(File file){
File[] listfiles=file.listFiles();
for (File file2 : listfiles) {
if(file2.isFile()){
System.out.println(new String (file2.getName()));
}
else {
try {
showfile(file2);
} catch (Exception e) {
}
}
}
}
}