08-20-2008 10:12 PM
What's the best way to rename an existing, open, NTFS file using the Win32 SDK?
There's no RenameFile() function.
Surely there's some way the Win32 API will help do this other than simply closing, creating a new file with new name, and copying old file to new, then deleting old?
Menchar
08-21-2008 05:59 AM
Check out MoveFile() in the SDK. I'm not sure it is legal to rename a file that is already open by another application at the time.
JR
08-21-2008 02:23 PM
JR - I saw that function but thought that there might be some better way. Surely this is done all the time.
No, I wouldn't expect to be able to rename an open file.
Menchar