how to get the folder path if no file is present in that folder using OpenFileDialog Class in WPF
{
Microsoft.Win32.OpenFileDialog dlgObjDest = new Microsoft.Win32.OpenFileDialog();
dlgObjDest.Multiselect = true;
dlgObjDest.DefaultExt = ".*";
dlgObjDest.InitialDirectory = "c:";
if (dlgObjDest.ShowDialog() == true)
{
txtDestTesting.Text = System.IO.Path.GetDirectoryName(dlgObjDest.FileName);
}
}
but it cant get folder path when there is no file to select