Link to home
Start Free TrialLog in
Avatar of Epurchase
EpurchaseFlag for United States of America

asked on

How to Find/Search files using URL path similar to FindFile

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..

Thanks in Advance..
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);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Epurchase
Epurchase
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial