aspose file tools*
The moose likes I/O and Streams and the fly likes How to copy PDF/Ms Word file to another directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "How to copy PDF/Ms Word file to another directory" Watch "How to copy PDF/Ms Word file to another directory" New topic
Author

How to copy PDF/Ms Word file to another directory

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Hello,




This code moves the file whereas I am looking for copying the file.
I mean the original file will remain on its place but its copy will be made to other directory. Please note file may be pdf or word any format

Thanks & best regards
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Please search before posting. This question comes up all the time and there are many helpful posts like this one


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Harsha Smith
Ranch Hand

Joined: Jul 18, 2011
Posts: 287
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Thanks from the bottom of my heart

Best regards
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2853
    
  11

Something worth checking out is org.apache.commons.io.FileUtils, and Apache Commons I/O in general. There are lot of useful utility methods there, including ones for copying files on a file system. I like Harsha's example using NIO though.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to copy PDF/Ms Word file to another directory