Originally posted by Sivaraman Lakshmanan:
Thanks for all your replies. As you guys said, I used FileChannel of Java.nio.channel package and studied the time to copy a file. This seems much faster than the normal IO file copy but even then this FileChannel is slower than the "COPY" command of OS. Does this mean that copying of file using programming language will be slower than the OS way.
Originally posted by William Brogden:
I would expect the OS way to always be faster since the OS can use its internal file buffers directly. Any program is probably going to be working with indirect access to OS file buffers.
Originally posted by Stefan Wagner:
But copying with java should give much more easy error access.
Imagine copying 1000 files with the OS, and getting interrupted by an error while processing file 397 or 721 or which?
Originally posted by Roger Chung-Wee:
Are you doing this as a short-term excercise or is it something which will be put into production? If it is the latter, then the file copies should be done programmatically or by scripting. I would write it in Java and run it with an Ant script.
Originally posted by Ilja Preuss:
I agree with Roger - this sounds like it should be handled by a Version control system. (Though I would recommend SVN over CVS... )