Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.2k views
in .NET FTP by (280 points)
Hi,

I'm using edtFTPnetPRO along with GLo0balScape SecureFTP Server

The FTPFile.LastModified Property doesnot return the File modified time in seconds precision.
the FTPFile.LastModified is always at minutes precision due to which
i'm facing problems in maintaining the order of of lastmodified time if two files are modified in same minute but in different seconds.

Urgent!! help is required.

Thanks in Advance
Surya

4 Answers

0 votes
by (51.6k points)
Hi Surya

Can you please have a look Raw property of the FTPFile objects? This is the string that is returned by the server in directory listings and the one that we parse to initialize the FTPFile objects. If it does include seconds and it's not returned by FTPFile.LastModified then that would indicate a bug in our parsing code, which we will fix straight away. However, most servers do not return seconds in directory listings and in those cases there's nothing we can do about it as far as directory listings are concerned.

However, an alternative is to call the SecureFTPConnection.GetLastWriteTime(string) method on each file that you need the seconds for. It retrieves the time using a different command (MDTM), which according to the standard is supposed to include the seconds.

Please let us know what you find so that we have the opportunity to improve our code if it has weaknesses.

- Hans (EnterpriseDT)
0 votes
by (280 points)
Hi Hans,

Thanks for the quick response.
we are the registered users of "edtFTPnetPRO.dll"

1.FTPFile.RAW property does not contain seconds precision.
2.i have tried ProFTPConnection everything is building fine.
3.While transferring using ProFTPConnection i'm getting DateTime Exception during the GetLastWriteTime()
i'm using the latest build "edtFTPnetPRO.dll 4.1.2.0"
attached is the log :
2007-05-29 20:28:20,968 [2240] DEBUG - SENT 192.168.0.255 : ---> MDTM 12.test
2007-05-29 20:28:20,968 [2240] DEBUG - RECEIVED 192.168.0.255 : 213 20070511180234.46
2007-05-29 20:28:20,984 [2268] DEBUG - SENT 192.168.0.255 : ---> QUIT
2007-05-29 20:28:20,984 [2268] DEBUG - RECEIVED 192.168.0.255 : 221 Service closing control connection.
2007-05-29 20:28:20,984 [2240] ERROR - Error in job.
2007-05-29 20:28:20,984 [2240] ERROR - Error Message: String was not recognized as a valid DateTime.
2007-05-29 20:28:20,984 [2240] ERROR - Error StackTrace: at System.DateTime.ParseExact(String s, String[] formats, IFormatProvider provider, DateTimeStyles style)
at EnterpriseDT.Net.Ftp.FTPClient.ModTime(String remoteFile)
at EnterpriseDT.Net.Ftp.FTPConnection.GetLastWriteTime(String remoteFile)

this seems to be a parser error.

FYI: using GlobalScape Secure FTP server

we have our deadlines to reach;kindly provide a Fix ASAP.

Thanks
Surya
0 votes
by (51.6k points)
Hi Surya

The MDTM command is returning "20070511180234.46", which not being parsed successfully because there are only two digits after the fullstop. This is clearly a weakness, which we have fixed in our code-base. Please e-mail support@... so that we can send you a patch.

By the way, ProFTPConnection has been superceded by SecureFTPConnection, so please use that instead.

- Hans (EnterpriseDT)
0 votes
by (51.6k points)
Hi Surya

The MDTM command is returning "20070511180234.46", which not being parsed successfully because there are only two digits after the fullstop. This is clearly a weakness, which we have fixed in our code-base. Please e-mail support@... so that we can send you a patch.

By the way, ProFTPConnection has been superceded by SecureFTPConnection, so please use that instead.

- Hans (EnterpriseDT)

Categories

...