Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I want to download the file if it is created today, here is my code but it is not working

        m_pNextInfo = new WIN32_FIND_DATA;
	m_bGotLast = FALSE;

	
	if (pstrName == NULL)
		pstrName = _T("*");
	lstrcpy(((LPWIN32_FIND_DATA) m_pNextInfo)->cFileName, pstrName);



	m_hContext = FtpFindFirstFile((HINTERNET) *m_pConnection,
		pstrName, (LPWIN32_FIND_DATA) m_pNextInfo, dwFlags, m_dwContext);


//	FILETIME* pTimeStamp;SYSTEMTIME& st,ct;
	*pTimeStamp = (FILETIME)((LPWIN32_FIND_DATA) m_pNextInfo)->ftCreationTime);
	
	FileTimeToSystemTime(*pTimeStamp,&st);
	GetSystemTime(&ct);
	
	if(st.wMonth==ct.wMonth)
		return false;
Posted
v2
Comments
Added code block
Sergey Alexandrovich Kryukov 2-Jun-11 15:28pm    
It does not help. What is not working, exactly?
--Sa

1 solution

which LOC is not working as you wanted ? ..... if all are working then there must be some mismatch in your system's time zone and FTP Zone
Sanjay
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900