Java tutorial
import java.io.File; public class Main { public static void deleteFolder(File f) { File[] files = f.listFiles(); for (File fi : files) { if (fi.isDirectory()) { deleteFolder(fi); } fi.delete(); } } }