Is there a way to keep a file open, while not blocking its renaming by another application?
Keeping the file open does not block its renaming in Unix. Can I achieve the same behavior in Windows?
Is there a way to keep a file open, while not blocking its renaming by another application?
Keeping the file open does not block its renaming in Unix. Can I achieve the same behavior in Windows?
I am afraid not. Windows handles open files very different from unix (under *ux you can even move or delete a file without interfering with an open handle). Maybe with a new filesystem its possible (try the ext3 filesystem driver for windows for example)
You need to open your file with the sharing mode FILE_SHARE_DELETE
(0x00000004).
See MSDN help for the CreateFile API.