Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.8k views
in .NET FTP by (160 points)
Hello Guys,

I having issues trying to invoke the command chmtime using a SecureFTPConnection object.

3 Answers

0 votes
by (162k points)
InvokeCommandSSH is the correct one to use. Is chmtime available on the server? Have you run it on the server using this user account?
0 votes
by (160 points)
Yes, chmtime is available on the server, in fact I can call that command using Filezilla client.

chmtime seems to not being recognized on the server when I use InvokeCommandSSH . The server is running Filezilla Server over Windows 2003.

string[] parameters = new string[2];
parameters[0] = "<time_stamp>";
parameters[1] = "<file_Path>";
string reply = ftpConnection.InvokeCommandSSH("chmtime ", parameters); <- 'chmtime' is not recognized as an internal or external command, operable program or batch file.

Am I calling the method in the correct way?
0 votes
by (51.6k points)
The commands FileZilla displays in its console are not actual SFTP commands. In fact, the SFTP protocol doesn't really have commands as such at all, but instead uses parameterized messages with names like SSH_FXP_OPEN, SSH_FXP_READ and SSH_FXP_SETSTAT. The commands that are used in SFTP command-line clients and that you see in FileZilla are only meaningful within the client itself and are not actually sent over the line.

When FileZilla displays chmtime, I think it's simply telling you that it's set the mod-time of the remote file. To do this in SecureFTPConnection, you need to call the SetLastWriteTime method.

- Hans (EnterpriseDT)

Categories

...