File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes help to move a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "help to move a file" Watch "help to move a file" New topic

help to move a file

Tex Abrey

Joined: Oct 04, 2002
Posts: 24
I am using this code and all i get is False returned when i try and use the renameTO() method
<%-- java include files --%>
<%@ page import="*" %>
<%@ page import="" %>
//starts going through the list of pdf files
File old = new File("/inet/docroot/CorporateResources/Newsclippings/upload/02-01-11_R01.pdf");
File moved = new File("/inet/docroot/dabrey/Newsclippings/clippings/02/01/02-01-11_R01.pdf");

boolean flag = false;
flag = old.renameTo(moved);
catch(Exception e) {
I agree. Here's the link:
subject: help to move a file
It's not a secret anymore!