Java tutorial
//package com.java2s; import java.io.File; public class Main { public static void File_iterateFiles(String dir) { File f = new File(dir); File[] files = f.listFiles(); if (null != files) { for (File ff : files) { if (ff.isDirectory()) { File_iterateFiles(ff.getPath()); } else { //TODO } } } } }