Click here to Skip to main content
15,902,275 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to replace the system clock? Pin
dennisV8-Feb-03 21:06
dennisV8-Feb-03 21:06 
AnswerA soldering iron and quite some luck! Pin
Mike Nordell9-Feb-03 15:08
Mike Nordell9-Feb-03 15:08 
AnswerRe: How to replace the system clock? Pin
ELY M.21-Aug-04 5:13
ELY M.21-Aug-04 5:13 
GeneralRe: How to replace the system clock? Pin
dennisV21-Aug-04 14:15
dennisV21-Aug-04 14:15 
Generala global mouse hook Pin
king_of_the_world8-Feb-03 17:30
king_of_the_world8-Feb-03 17:30 
GeneralRe: a global mouse hook Pin
Paul M Watt8-Feb-03 20:13
mentorPaul M Watt8-Feb-03 20:13 
GeneralRe: a global mouse hook Pin
king_of_the_world8-Feb-03 20:26
king_of_the_world8-Feb-03 20:26 
GeneralRecursive CFtpFileFind Pin
User 127828-Feb-03 16:47
User 127828-Feb-03 16:47 
I am trying to recursively list all the files on a FTP server. Right now, all it does is list the files in root. The function appears to be called for each directory it encounters, but it never finds any files on it. The server log never shows a list command being issued, but a printf shows that the function is entered. Any suggestions?

CInternetSession sess(_T("SomeApp/1.0"));
CFtpConnection* pConnect = NULL;

//..

void Search(CString sPath)
{
	CFtpFileFind finder(pConnect);
	CString sSearch;
	sSearch.Format("%s/*",sPath);
	try
	{
		BOOL bWorking = finder.FindFile(sSearch);

		while (bWorking)
		{
			bWorking = finder.FindNextFile();

			printf("%s\n", (LPCTSTR)finder.GetFilePath());
			if(finder.IsDirectory() && !finder.IsDots())
				Search(finder.GetFilePath());
		}
		finder.Close();
	}
	catch (CInternetException* pEx)
	{
		TCHAR sz[1024];
		pEx->GetErrorMessage(sz,1024);
		printf("ERROR:  %s\n",sz);
		pEx->Delete();
	}
}



//Calling code:
pConnect = sess.GetFtpConnection(_T("server"),"Username","password");
Search("");


Thanks,
Aaron Stubbendieck

modified 12-Jul-20 21:01pm.

Generaltrying to shut down windows Pin
king_of_the_world8-Feb-03 15:53
king_of_the_world8-Feb-03 15:53 
GeneralRe: trying to shut down windows Pin
Abbas_Riazi8-Feb-03 17:39
professionalAbbas_Riazi8-Feb-03 17:39 
GeneralRe: trying to shut down windows Pin
king_of_the_world8-Feb-03 17:51
king_of_the_world8-Feb-03 17:51 
GeneralRe: trying to shut down windows Pin
Abbas_Riazi9-Feb-03 5:38
professionalAbbas_Riazi9-Feb-03 5:38 
QuestionHow do i use the overload operator= in a CObject? Pin
Anonymous8-Feb-03 15:49
Anonymous8-Feb-03 15:49 
AnswerRe: How do i use the overload operator= in a CObject? Pin
includeh109-Feb-03 2:39
includeh109-Feb-03 2:39 
GeneralMultiple document templates Pin
Perseus8-Feb-03 14:55
Perseus8-Feb-03 14:55 
GeneralRe: Multiple document templates Pin
Roger Allen10-Feb-03 6:40
Roger Allen10-Feb-03 6:40 
GeneralRe: Multiple document templates Pin
Perseus11-Feb-03 12:48
Perseus11-Feb-03 12:48 
GeneralSave File Dialog Creation Pin
orcblood8-Feb-03 14:01
orcblood8-Feb-03 14:01 
GeneralRe: Save File Dialog Creation Pin
Michael Dunn8-Feb-03 14:39
sitebuilderMichael Dunn8-Feb-03 14:39 
GeneralRe: Save File Dialog Creation Pin
orcblood9-Feb-03 7:01
orcblood9-Feb-03 7:01 
QuestionHow to get Key name from Vitrual-Key code? Pin
Aidman8-Feb-03 13:40
Aidman8-Feb-03 13:40 
AnswerRe: How to get Key name from Vitrual-Key code? Pin
KaЯl9-Feb-03 21:40
KaЯl9-Feb-03 21:40 
GeneralRe: How to get Key name from Vitrual-Key code? Pin
Aidman10-Feb-03 10:23
Aidman10-Feb-03 10:23 
GeneralRe: How to get Key name from Vitrual-Key code? Pin
KaЯl11-Feb-03 4:53
KaЯl11-Feb-03 4:53 
GeneralRe: How to get Key name from Vitrual-Key code? Pin
Aidman11-Feb-03 8:50
Aidman11-Feb-03 8:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.