Hello! I'm using to TWebCopy for Upload/Download a files to a SFTP Server.
I'm try to Download one file but the TWebCopy component response: "OLE Exception: C06D007E".
The configuration:
In The "TargetDir" param I especific the local path.
In the "URL" param I especific the sftp file (example: Send/test.txt).
In the "Protocol" param: wpSFTP.
In the other params (FTPHost, FTPPort(22), FTPUserID and FTPPassword) the SFTP configuration.
I want to retrieve a list of files on the SFTP server, but i don't know that Protocol use.
For FTP Server, is the wpFTPList protocol. I try with that protocol, using a code of example in TMSSoftware.com:
webcopy.Items.Clear;
with webcopy.Items.Add do
begin
FTPHost := 'example.sftp.com';
FTPUserID := 'user';
FTPPassword := 'pasword';
Protocol := wpFtpList;
TargetDir := path_with_root_permissions;
URL := '\*.txt';
end;
webcopy.Execute;
for i := 0 to webcopy.Items[0].FileDetails.Count - 1 do
begin
listbox.Items.Add(webcopy.Items[0].FileDetails[i].FileName);
end;
But webcopy.Items[0].FileDetails always is Nil. Where is the problem? Can I obtain the list with SFTP Server?