I have a C# .NET 3.5 app that I have incorporated the DragDrop event on a DataGridView.
#region File Browser - Drag and Drop Ops
private void dataGridView_fileListing_DragDrop(object sender, DragEventArgs e)
{
string[] fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
foreach (string fileName in fileList)
{
//logic goes here
}
}
My question is, how can I differentiate a windows shortcut from an actual file? I tried:
File.exists(fileName)
in an IF block which is useful to filter out directories that have been dragged in, however shortcuts get through. Is there anyway on to tell a shortcut in the data passed in by the event data, or by querying the file system once I have the name?