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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find the whole path of the file??

Status
Not open for further replies.

Vallurupa

Programmer
Oct 17, 2001
38
US
Hi

I am trying to find the path of the file.

I am using GetFullPathName( ---). But it is retriving the current path. Not the files actual path. I move exe to any directory. It is taking that diee path. Please help me in finding the whole path of the file. I am using FindFirstFile( ) FindNextFile() functions to search the files from the directory and i am taking the file name from
WIN32_FIND_DATA stracture...
please help me to solve this problem...

Thanks in advance..

Venkat
 
If you are happy using MFCs you could get what you're after by using CFileFind;

i.e.
CFileFind ciFF;
if(ciFF.FindFile("test.dat"))
{
ciFF.FindNextFile();
CString TheFullPath = FullciFF.GetFilePath());
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top