Java tutorial
//package com.java2s; import java.io.File; public class Main { public static void deleteAllFromPath(String path) { File folder = new File(path); if (null != folder) { File[] files = folder.listFiles(); for (File file : files) file.delete(); } } }