I want all the features of file.renameTo in java but without the source file getting deleted. For eg: Say I have a file report.doc and I want to create the file report.xml without report.doc getting deleted. Also, the contents of both the files should be the same. (A simple copy) How do I go about doing this?
I know this might be trivial but some basic searching didn't help.