龙
龙之天涯
Unregistered / Unconfirmed
GUEST, unregistred user!
try
{
if((hSearch=FindFirstFile(FindPath,&FindData))!=INVALID_HANDLE_VALUE)
{
CreateDirectory(pThis->m_strBAK,NULL);
CreateDirectory(pThis->m_strBAK +"//"+tcAfxData.m_strYZRQ.Left(7),NULL);
sprintf(FileName,"%s//%s",pThis->m_strFILE,FindData.cFileName);
sprintf(BakName,"%s//%s",pThis->m_strBAK +"//"+tcAfxData.m_strYZRQ.Left(7),FindData.cFileName);
sprintf(FtpFile,"%s/%s",pThis->m_strML,FindData.cFileName);
if(pConn->PutFile(FileName,FtpFile))
{
if (pThis->m_strBAK!=""
{
if(!MoveFileEx(FileName,BakName,MOVEFILE_REPLACE_EXISTING))
TRACE("MOVE ERROR/n"
}
}
else
goto BallOut;
while(FindNextFile(hSearch,&FindData))
{
sprintf(FileName,"%s//%s",pThis->m_strFILE,FindData.cFileName);
sprintf(BakName,"%s//%s",pThis->m_strBAK,FindData.cFileName);
sprintf(FtpFile,"%s/%s",pThis->m_strML,FindData.cFileName);
if(pConn->PutFile(FileName,FtpFile))//出问题的是这句,在2003下面就传不上去
{
if(!MoveFileEx(FileName,BakName,MOVEFILE_REPLACE_EXISTING))
TRACE("MOVE ERROR/n"
}
else
goto BallOut;
}
AfxMessageBox("已成功上报!"
return true;
}
else
{
CString vStrTip = "没有找到该文件!"+ (CString)FindPath;
AfxMessageBox(vStrTip);
return false;
}
Sleep(200);
FindClose(hSearch);
{
if((hSearch=FindFirstFile(FindPath,&FindData))!=INVALID_HANDLE_VALUE)
{
CreateDirectory(pThis->m_strBAK,NULL);
CreateDirectory(pThis->m_strBAK +"//"+tcAfxData.m_strYZRQ.Left(7),NULL);
sprintf(FileName,"%s//%s",pThis->m_strFILE,FindData.cFileName);
sprintf(BakName,"%s//%s",pThis->m_strBAK +"//"+tcAfxData.m_strYZRQ.Left(7),FindData.cFileName);
sprintf(FtpFile,"%s/%s",pThis->m_strML,FindData.cFileName);
if(pConn->PutFile(FileName,FtpFile))
{
if (pThis->m_strBAK!=""
{
if(!MoveFileEx(FileName,BakName,MOVEFILE_REPLACE_EXISTING))
TRACE("MOVE ERROR/n"
}
}
else
goto BallOut;
while(FindNextFile(hSearch,&FindData))
{
sprintf(FileName,"%s//%s",pThis->m_strFILE,FindData.cFileName);
sprintf(BakName,"%s//%s",pThis->m_strBAK,FindData.cFileName);
sprintf(FtpFile,"%s/%s",pThis->m_strML,FindData.cFileName);
if(pConn->PutFile(FileName,FtpFile))//出问题的是这句,在2003下面就传不上去
{
if(!MoveFileEx(FileName,BakName,MOVEFILE_REPLACE_EXISTING))
TRACE("MOVE ERROR/n"
}
else
goto BallOut;
}
AfxMessageBox("已成功上报!"
return true;
}
else
{
CString vStrTip = "没有找到该文件!"+ (CString)FindPath;
AfxMessageBox(vStrTip);
return false;
}
Sleep(200);
FindClose(hSearch);