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

Verifying a file path + other file path operations

P: n/a
(Using C#)

Question 1:
Is there an easy build-in support for determining wether a given file path
is

1) A valid file path (Only legal characters)
2) The file exists
3) The path exists

Question 2:
In there an easy way to extract the file name, the path or the file
extension from an absolut or relative file path?

Thank you very much!!

regards, Teis


Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Teis,

Have a look at

The path class
http://msdn.microsoft.com/library/de...classtopic.asp

The file class
http://msdn.microsoft.com/library/de...classtopic.asp

The directoryinfo class
http://msdn.microsoft.com/library/de...classtopic.asp

I hope this help?

Cor
Jul 21 '05 #2

P: n/a
Thanks, Cor
I hope this help? -yes, indeed!!

( There were two references to the file class, here's the direct link to the
DirectoryInfo class)
http://msdn.microsoft.com/library/de...ClassTopic.asp

Thank you, Teis

Have a look at

The path class
http://msdn.microsoft.com/library/de...classtopic.asp
The file class
http://msdn.microsoft.com/library/de...classtopic.asp
The directoryinfo class

http://msdn.microsoft.com/library/de...classtopic.asp
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.