Java tutorial
//package com.java2s; import java.io.File; public class Main { public static void delFile(String path, String strFileName) { try { File myFile = new File(path, strFileName); if (myFile.exists()) { myFile.delete(); } } catch (Exception e) { e.printStackTrace(); } } }