Just trying to use Java to rename the root of a folder tree.
Using File.renameTo() works in Windows only is the folder has no contents at all. I can't seem to find if this is expected behaviour or not. It doesn't seem to be mentioned in the docs.
I am current having to use a recursive file\folder copy process then delete the original, but this is rather more intensive than I was hoping for in a folder tree where each node con potentially have hundreds of children.
It looks like Java 7 has Path.moveTo() but I can't use 7 just yet.
Am I stuck doing it the dirty way, or is there a way to get just the root folder name changed?
Thanks.