h.b.furuseth@usit.uio.no wrote:
hyc@symas.com writes:
I guess we should be using #ifdef _WIN32 / ReplaceFile instead of rename() in this case.
Argh, why didn't that arrive before I wrote my reply? I don't know Windows...
I don't think it's worth the effort to learn, really. But all of the Windows API documentation is on msdn.microsoft.com if you're inclined to read it.
MoveFileEx(old,new,MOVEFILE_REPLACE_EXISTING) would also be fine. http://msdn.microsoft.com/en-us/library/aa365240(VS.85).aspx