Java examples for File Path IO:Directory Delete
delete a particular file or directory from filesystem
import java.io.*; public class Main { public static void main(String[] args) { File file = new File("C://Folder/DeleteDemo.txt"); //w w w . j a v a 2s . c om boolean blnDeleted = file.delete(); System.out.println("Was file deleted ? : " + blnDeleted); } }