Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.1k views
in .NET FTP by
Hi,
FtpClient.ModTime() raises an exception, for one of the ftpsites I am using. It works fine with other ftp sites.

Basically the exception is because , the ftp site doesnt understand the command "MDTM filename"...

what is the solution for this...how do i know the modtime for a file now.
If I have to use FtpClient.Dir(path,true), I guess it returns the mod time but it truncates the seconds. So what is the true solution for this.

Thank you,
Srinivas Varukala

1 Answer

0 votes
by (162k points)
There is not really a solution in this case.

You could zip the files on the server and fetch them locally - the timestamps will be preserved. Or when they are created you could create a timestamp file that has the timestamp as part of its name, for example. This all presumes you have some control over the server files.

Otherwise, you have to do the best you can with DirDetails without being able to use seconds.

Hi,
FtpClient.ModTime() raises an exception, for one of the ftpsites I am using. It works fine with other ftp sites.

Basically the exception is because , the ftp site doesnt understand the command "MDTM filename"...

what is the solution for this...how do i know the modtime for a file now.
If I have to use FtpClient.Dir(path,true), I guess it returns the mod time but it truncates the seconds. So what is the true solution for this.

Thank you,
Srinivas Varukala

Categories

...