On Mon, 04 Apr 2005, Steve Hay wrote: > Jan Dubois wrote: >> This is actually not exactly true. rename() can move files to >> different directories on Win32 as long as source and destination are >> on the same filesystem. >> > On my WinXP box, rename() can move files to different directories, > including where those directories are on a different drive, a mapped > network drive from another WinXP box, and even a mapped network drive > from a Solaris box running Samba.
Yes, you are right. The limitation only applies to directories, which can only be renamed but not actually moved. I'm not sure if moving files to a different volume works under Win9X though, and currently don't have access to a box to test (we have some duplicate code in win32_rename() that uses MoveFileEx() only on WinNT, but uses the C RTL rename() on Win95). The documentation for rename() doesn't mention a limitation for Win95, but then we should be able to use MoveFileEx() there too... Cheers, -Jan
