OpenFileDialog fd = new OpenFileDialog();
string NameOfFile = "";
string path = "";
if (fd.ShowDialog() == DialogResult.OK)
{
NameOfFile = System.IO.Path.GetFileName(fd.FileName);
path = System.IO.Path.GetDirectoryName(fd.FileName);
}
MessageBox.Show(NameOfFile, "Name Of File");
MessageBox.Show(path, "Directory");