Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the path of a file just knowing the file name

Status
Not open for further replies.

cdvalera

Programmer
Aug 5, 2008
6
EC
Hi...

How can i get the path of a file just knowing the file name???

I have tried the following:

string xpath = Path.GetFulPath("MyImage.JPG");

But i doesn´t give me the right path...

Christian Valera V.
 
Well, if you think about it, there could be any number of files called "MyImage.JPG" on your system in different folders. This is a matter of not giving enough information to get what you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top