It looks like renameTo on Windows is not necessarily atomic, in particular
if the destination file exists there can be problems. MoveFileEx is
supposedly the way to go and should give better results.
This feature has been addressed by the new file system API defined by JSR-203.
In WinNTFileSystem and Win32FileSystem, we call the C Runtime _wrename() and rename() functions respectively. Although it appears that MoveFileExW does not provide any guarantees over the rename(), there are good reasons to not go through the C Runtime on windows if it's not necessary.
Note that MoveFileExW does not exist for win9x so we'd have to change that code to use MoveFile.
Will investigate this for the next release.