FileUtils.copyFileToDirectory(fileupdate, ftarget);
String appname = FilenameUtils.concat(ftarget.getPath(), fileupdate.getName());
StringBuffer output = new StringBuffer();
StringBuffer error = new StringBuffer();
//extract a self-extracting .exe file by executing this file.
new CommandExecutor().exec(appname, output, error, new File(targetDir));
truncate(fileupdate);
if (removeSourceFile)
new File(appname).delete();
}