create a new file object for the file you want to use

File fh = new File("/home/user/foo");

fh.renameTo(new File("/home/user/dir1/dir2/foobar"));

hope this helps
thanks
asif

> -----Original Message-----
> From: RAJESH SINGHANIA [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 20, 2002 2:50 PM
> To: [EMAIL PROTECTED]
> Subject: moving of file
>
>
> hello all,
>
> currently i am facing one problem of moving a file from one
> directory to the other directory. I have used java.io package
> for moving a file but by using this performance is very low.
>
> so, is their any other way of moving a file from java program.
>
> please help me
>
> regards,
>
> rajesh

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to