[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • Last Modified:

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

0
Epurchase
Asked:
Epurchase
1 Solution
 
EpurchaseAuthor Commented:
There is no way to directly search a http folder to find list of files.there is no notion of http folder,  and there is no list of files..

The only possible way is that the http server need to find the list of files from the folder and send to the client or the webservice can be used.

It would be really appreciating if anybody knows a way to find the file list from client using vc++/mfc for http folder..

Thanks,
Siju..
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now