Here you can find the source of executeDELETE(String parameters)
public static boolean executeDELETE(String parameters)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static final String ROOT = "user.dir"; public static boolean executeDELETE(String parameters) { // TODO Auto-generated method stub boolean deleteStatus = false; try {//from w w w .j ava2 s . com File file = new File(executePWD() + File.separator + parameters); if (file.exists()) { deleteStatus = file.delete(); System.out.println("is delete successful ? " + deleteStatus); } else { System.out.println( ":::: File does not exist ::: File:: " + executePWD() + File.separator + parameters); deleteStatus = false; } } catch (Exception e) { System.out.println("Exception in execute delete command" + e.getMessage()); } return deleteStatus; } public static String executePWD() { // TODO Auto-generated method stub String currentDirectory = null; try { currentDirectory = System.getProperty(ROOT); } catch (Exception e) { System.out.println("----Exception in PWD command execution -----" + e.getMessage()); } return currentDirectory; } }