Is there any way, in any language, to hook my program when a user renames a file?
For example: A user renames a file and presses enter (or clicks away) to confirm the rename action. BEFORE the file is actually renamed, my program ‘listens’ to this event and pops up a message saying ‘Are you sure you want to rename C:\test\file.txt to C:\test\test.txt?’.
I’m thinking/hoping this is possible with C++, C# or .NET.. But I don’t have any clue where to look for.
You can probably solve this by using the FileSystemWatcher class in .NET framework.
From the class remarks: