copy file from one location to another location in linux using java program

Posted by Mouli on Stack Overflow See other posts from Stack Overflow or by Mouli
Published on 2010-12-31T07:48:40Z Indexed on 2010/12/31 7:53 UTC
Read the original article Hit count: 266

Filed under:
|

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);

© Stack Overflow or respective owner

Related posts about java

Related posts about jsp