copy file from one location to another location in linux using java program
- by Mouli
Using JSP am trying to move customer logo into another location in linux but its not working.
thanks in advance
Here is my program
String customerLogo = request.getParameter("uploadCustomerLogo").trim();
StringBuffer absoluteFolderPath = new StringBuffer();
absoluteFolderPath.append("/zoniac");
absoluteFolderPath.append("/Companies/");
absoluteFolderPath.append("companyCode/");
absoluteFolderPath.append("custom/");
String destination = absoluteFolderPath.toString();
File sourcefile = new File(customerLogo);
File destfile = new File(destination+sourcefile.getName());
FileUtils.copyFile(sourcefile,destfile);