Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get notification of copy/move operations done through Explorer?

213 views
Skip to first unread message

vikas...@gmail.com

unread,
Dec 18, 2013, 11:11:16 PM12/18/13
to
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

unread,
Dec 19, 2013, 3:07:28 AM12/19/13
to
>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

unread,
Dec 19, 2013, 11:43:31 PM12/19/13
to
> 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

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

unread,
Dec 20, 2013, 3:19:18 AM12/20/13
to
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
0 new messages