Reputation: 99
This is for files which I copy anywhere in explorer either from right click context menu or Ctrl+C.
I looked at System.Windows.Clipboard but there doesn't seem to be a method to get any information about a file which was copied.
Any help in appreciated.
Upvotes: 5
Views: 1278
Reputation: 874
this work for you
Clipboard is inside System.Windows.Forms, use this way:
if (Clipboard.ContainsFileDropList())
{
var filesArray = Clipboard.GetFileDropList();
//now you have a array of file address
}
else if(Clipboard.ContainsText())
{
var fileName = Clipboard.GetText();
}
Upvotes: 2