Discussion:
How to get notification of copy/move operations done through Explorer?
(too old to reply)
v***@gmail.com
2013-12-19 04:11:16 UTC
Permalink
Raw Message
In my program I want to get a notification *before* any file gets copied/moved through Explorer.
I am aware that there is an interface IFileOperationProgressSink (e.g. PreCopyItem) which does the same but I don't want to use it.
Is there any other way by which I can get notification before any file gets copied/moved?

1) I want to implement a kind of copying utility where I would decide whether any particular file should be copied/moved or not.
2) My utility should get notified as soon as ctrl+c/right click+copy is invoked on file/folder.
As I understood, there are methods those give notifications *after* change has happened however in my case I want it *before* it.
In case of IFileOperationProgressSink, if I return error from PreCopyItem the whole operation terminates however I want to continue to next item from selected list.
David Lowndes
2013-12-19 08:07:28 UTC
Permalink
Raw Message
Post by v***@gmail.com
In my program I want to get a notification *before* any file gets copied/moved through Explorer.
Have a look at copy hook shell extensions - the ICopyHook interface:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776049(v=vs.85).aspx

From its description that might be what you need.

Dave
ViksGoldsmith
2013-12-20 04:43:31 UTC
Permalink
Raw Message
Post by David Lowndes
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776049(v=vs.85).aspx
Hi Dave,

Thanks for the reply.
I checked the ICopyHook interface however it is applicable to FOLDER only not to files.
I searched for similar interface for files but couldn't find one.
David Lowndes
2013-12-20 08:19:18 UTC
Permalink
Raw Message
Post by ViksGoldsmith
Post by David Lowndes
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776049(v=vs.85).aspx
Hi Dave,
Thanks for the reply.
I checked the ICopyHook interface however it is applicable to FOLDER only not to files.
I searched for similar interface for files but couldn't find one.
Sorry about that - I missed that point.

Other than a low-level file system filter driver (probably quite
difficult to do), I don't know what else to suggest for your
requirements.

Dave

Loading...