I want to use the Directory.Exists method to see if a directory exists. But
it doesn't seem to work for the root of a removable (USB) drive.
I plug in my drive and it gets allocated a letter ("F:"). I then confirm
that I can view the drive in Windows Explorer but:
Directory.Exists("F:\")
returns False!
Directory.Exists("C:\")
returns True as expected!
Is this by design or a bug? Is there an alternative that will work for all
paths including on removable drives?
Thanks,
elziko
it doesn't seem to work for the root of a removable (USB) drive.
I plug in my drive and it gets allocated a letter ("F:"). I then confirm
that I can view the drive in Windows Explorer but:
Directory.Exists("F:\")
returns False!
Directory.Exists("C:\")
returns True as expected!
Is this by design or a bug? Is there an alternative that will work for all
paths including on removable drives?
Thanks,
elziko