Skip to content

Instantly share code, notes, and snippets.

@SajjadArifGul
Created October 8, 2015 19:14
Show Gist options
  • Save SajjadArifGul/d9af4809532cbf86fa82 to your computer and use it in GitHub Desktop.
Save SajjadArifGul/d9af4809532cbf86fa82 to your computer and use it in GitHub Desktop.
// Creating a list of File.
List<string> file_list = new List<string>();
//Putting Files from any Directory to this List by foreach loop.
foreach (string file_name in Directory.GetFiles(Application.StartupPath))
file_list.Add(file_name);
//Clear the already copied Data of clipboard.
Clipboard.Clear();
//Copying File List to the Clip Board.
Clipboard.SetData(DataFormats.FileDrop, file_list.ToArray());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment