Thanks to Stack Overflow question Copy files to clipboard in C#, I was able to use Clipboard.SetFileDropList and end up with:
using System;
using System.Collections.Specialized;
using System.Windows.Forms;
class Program
{
[STAThread]
static void Main ( string[] args)
{
StringCollection paths = new StringCollection();
paths.Add( @"C:\Users\Antonio\Desktop\MyDirectory" );
Clipboard.SetFileDropList( paths);
}
}
That way I can place an entire directory on the clipboard and paste it where I need it to. I would like to be able to paste it with code though. I don't want to go to the place where I want to paste it and then press Ctrl + V. In other words, I am looking for something like:
Clipboard.Paste("C:\Users\LocationWhereIWantToPasteTheFolder")
I know I can get all the files recursively and then paste them one by one. But why reinvent the wheel? It will be nice if the OS can do it for me...