Determining the ability to delete a file
I need to be able to determine if I can delete a file in NT/2000/XP, before actually deleteing it. The problem is, other applications may already have an open handle to the file. This causes any attempt to delete the file in an NT based OS to fail.
The only thing I can think of is to try to rename the file. This should also fail if another process has an open handle to the file. But I would rather not do this for every file since I maybe processing thousands of files.
Thank you for your time.