How to check the drive is exists in the system from the given string in WPF. I have tried the following
Ex: FileLocation.Text = \"K:\\TestDriv
This is Because Environment.SystemDirectory.XXXXX is all about where the system/windows is installed ...... not for whole HD.
for this you can use.....
foreach (var item in System.IO.DriveInfo.GetDrives())
{
MessageBox.Show(item.ToString());
}
it will show all drives including USBs that are attached.....