final String fileName;
if (path.contains("/")) {
fileName = path.substring(path.lastIndexOf("/") + 1);
} else {
fileName = path.substring(path.lastIndexOf("\\") + 1);
}
IFile importFile = importProject.getFile(fileName);
if (importFile.exists()) {
importFile.delete(true, null);