By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,671 Members | 1,567 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,671 IT Pros & Developers. It's quick & easy.

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

P: n/a

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ü
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Hi Kerem

Why doesn't File.Exists work?

// File
else if(Directory.Exists(string))
// Directory
// not a valid path

Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.