Missing files with: objDirectory = objFTPConnectionMTA.ReadDirectory()

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
Post Reply
avliet
Posts: 6
Joined: Fri Jan 17, 2014 4:49 pm

Missing files with: objDirectory = objFTPConnectionMTA.ReadDirectory()

Post by avliet » Fri Jan 17, 2014 5:04 pm

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
 
 
 
 
 
 
  
 
 
 

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

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

Post by mb » Fri Jan 17, 2014 5:34 pm

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.
Last edited by mb on Fri Jan 17, 2014 7:07 pm, edited 1 time in total.

avliet
Posts: 6
Joined: Fri Jan 17, 2014 4:49 pm

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

Post by avliet » Sat Jan 18, 2014 2:43 pm

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

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

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

Post by mb » Sat Jan 18, 2014 3:12 pm

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

avliet
Posts: 6
Joined: Fri Jan 17, 2014 4:49 pm

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

Post by avliet » Tue Feb 04, 2014 10:06 am

Solved

Post Reply