Page 1 of 1

Missing files with: objDirectory = objFTPConnectionMTA.ReadDirectory()

Posted: Fri Jan 17, 2014 5:04 pm
by avliet
Hi, maybe someone can help me.
 
I use SmartFTP within VB 2010 Express to access an internal FTP Server on the other site of a internal firewall. This server is FileZilla FTP Server.
 
I have the following simple lines of code:
 
objFTPConnectionMTA.ChangeDirectory(Directory_To_Check)
 
If objFTPConnectionMTA.LastError = 0 then
 
 objDirectory = objFTPConnectionMTA.ReadDirectory()
 
 <<code>>
 
Endif
 
The problem is that I use this in a loop to check if there are new files on the FTP Server (every 10 seconds). One file is always there, so this loop should always give at least one file back. But during the day, approximately 3 to 5 times per hour I get the information that there are 0 (zero) files on the FTP Server. But I never delete the file on the FTP Server. When I do an instant retry, I get the right information. So there is no big problem, but it is very weird.
 
Does anyone has this problem? Is there a problem with reading directory information on a FileZilla FTP Server?
 
Regards,
Arjan
 
 
 
 
 
 
  
 
 
 

Re: Missing files with: objDirectory = objFTPConnectionMTA.ReadDirectory()

Posted: Fri Jan 17, 2014 5:34 pm
by mb
Set the Log property of the connection object:
objFTPConnectionMTA.SetFileLogger().File = "c:\temp\bla.log"
Reference:
https://www.smartftp.com/static/ftplib/ ... rmat_.html
and then inspect the log file for data transfer errors.

Re: Missing files with: objDirectory = objFTPConnectionMTA.ReadDirectory()

Posted: Sat Jan 18, 2014 2:43 pm
by avliet
Hi mb,
 
I did this, but there are no errors in the logifle
 
Arjan

Re: Missing files with: objDirectory = objFTPConnectionMTA.ReadDirectory()

Posted: Sat Jan 18, 2014 3:12 pm
by mb
The log also shows the number of bytes transferred for each data transfer. Do you see any discrepancies there?

Re: Missing files with: objDirectory = objFTPConnectionMTA.ReadDirectory()

Posted: Tue Feb 04, 2014 10:06 am
by avliet
Solved