开发者

File/Folder right-click 'Copy' action, how does it copy to clipboard?

开发者 https://www.devze.com 2023-04-04 18:34 出处:网络
I\'m making an app that has some functional开发者_Go百科ity of windows explorer. Actually I have to make a copy/paste actions. My question is what does windows copy to clipboard, when I\'m right-click

I'm making an app that has some functional开发者_Go百科ity of windows explorer. Actually I have to make a copy/paste actions. My question is what does windows copy to clipboard, when I'm right-clicking the file and the choose 'Copy'?

Here's my Paste code:

var files = (string[])Clipboard.GetDataObject().GetData("FileName");
FileInfo info = new FileInfo(item);
info.CopyTo(Path.Combine(currentFolder, info.Name));


There are many formats present on the clipboard as a result of the copy. In XP, I get this:

* DataObject
* Shell IDList Array
* HDROP
* Preferred DropEffect
Shell Object Offsets
FileName
FileNameW
* Ole Private Data

The ones with * were read by Explorer when I pasted.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号