Pass multiple files / folders from windows explorer to external application

流过昼夜 提交于 2019-12-05 13:33:32

When you select multiple files in Explorer, your shell context menu extension's IShellExtInit::Initialize method will be called and pdtobj contains the selection. Note writing managed shell extension is not supported.

I don't think this is possible.

When you open multiple files using Explorer, it will launch a separate copy of your program for file. I don't think it's possible to override this behavior.

EDIT: I forgot about shell extensions. This is possible.

To work around this, you could make the subsequent copies communicate with the first one, then exit. Detailed instructions for this are beyond the scope of this answer.

In order to do this reliably you would need to write a shell extension, most likely a sendto implementation.

I haven't written one since vb6 but you can find what looks to be a good managed example here

Or you could use a freeware utility

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!