Java tutorial
//package com.java2s; import java.io.File; public class Main { public static boolean deleteDestFile(String sPath) { boolean flag = false; File file = new File(sPath); if (file.isFile() && file.exists()) { if (file.delete()) { flag = true; } else { flag = true; } } return flag; } }