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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top