import java.io.File; public class Main { public static void main(String[] argv) throws Exception { } public static void visitAllFiles(File dir) { if (dir.isDirectory()) { String[] children = dir.list(); for (int i = 0; i < children.length; i++) { visitAllFiles(new File(dir, children[i])); } } else { System.out.println(dir); } } }