2

I'm making an app that has some functionality 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));
4

1 回答 1

0

由于复制,剪贴板上存在许多格式。在 XP 中,我得到这个:

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

当我粘贴时,带有 * 的那些是由 Explorer 读取的。

于 2011-09-13T19:02:21.523 回答