Too Long; Didn't Read
There was no file copy method in the Java API until Java 7**. Java 7 has evolved now and you have a decent API to copy files from one directory to another. In this article, I'll show you both the pre-Java code and post Java 7 code which makes this task a lot easier. Copying File from directory to other before Java 7 was a life save those days and even today. The Apache Commons' FileUtils class is used to copy a file from a directory to a new location preserving file timestamp.