المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How to Find files using http url path?



C++ Programming
04-25-2009, 08:40 PM
Hi,

I have one scenario in code that finds all files from the given local/unc path with wildchar. The code sample is given. The enumerator could iterate through the number of files in that path and return the exact path of each file and which will be added to an array for later use..

The above part is working fine..but my requirement is to find the files in similar way with the url path. For eg; the path will be http://server/test/*.bmp and it need to get the url of all file existing on that path like, http://server/test/a.bmp, b.bmp, etc..

Is there any way similar to the code given to do this for url path..I have tried the way OpenUrl() and CinternetSession but it didn't work..Would really appreciate for showing the right way..

CFileFind fileFinder;
char oldDirectory[512];
GetCurrentDirectory(512,oldDirectory);
BOOL flag= fileFinder.FindFile(pathDirectory+strWildcard);
while(flag )
{
flag = fileFinder.FindNextFile();
lstArray.Add(fileFinder.GetFilePath());

}
SetCurrentDirectory(oldDirectory);

Thanks in Advance..

SoftwareDeveloper(.NET)