Missing files with: objDirectory = objFTPConnectionMTA.ReadDirectory()

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
 
 
 
 
 
 
  
 
 
 

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.

Hi mb,
 
I did this, but there are no errors in the logifle
 
Arjan

The log also shows the number of bytes transferred for each data transfer. Do you see any discrepancies there?

Solved