Checking whether "SomeString" is Directory or File...

  • Thread starter Thread starter Kerem Gümrükcü
  • Start date Start date
K

Kerem Gümrükcü

Hi,

how can i find out, whether a given string specifies a Path or a file...

System.IO.File.Exist(UnknownString) does not work for my
application. i exactly need to know if the strng is a path or a file...

But how the h*** can i find it out....


Thanks in advance....


Kerem Gümrükcü
 
Hi Kerem,

Please do not multipost, see my answer in the csharp group.
The method won't work if you are trying to determine if a string is a
valid path (though maybe not on your system) If that is your goal, you
may need to check the string for characters defined in the
Path.InvalidPathChars property.
 
Back
Top