When I try to use DownloadFile on a SFTP server, I get the error "The massage [file.csv] is not extractable".
On my local SFTP server all work fine, but on the real SFTP server the error is issued.
Where is the problem?
Thanks
ScSFTPClient DownloadFile error
Re: ScSFTPClient DownloadFile error
It seems, that SFTP Server cannot access a home directory.
Try to download a file step by step without using the DownloadFile method. Please follow the steps below:
1. Establish SFTP connection using the TScSFTPClient.Initialize method.
2. Open a remote file by the OpenFile method.
3. Retrieve file attributes by the RetrieveAttributesByHandle method.
4. Read the data using the ReadFile method in a loop until the file download is completed.
Try to download a file step by step without using the DownloadFile method. Please follow the steps below:
1. Establish SFTP connection using the TScSFTPClient.Initialize method.
2. Open a remote file by the OpenFile method.
3. Retrieve file attributes by the RetrieveAttributesByHandle method.
4. Read the data using the ReadFile method in a loop until the file download is completed.
-
- Posts: 3
- Joined: Thu 03 Apr 2014 06:13
Re: ScSFTPClient DownloadFile error
Thank You very much, I will try it
-
- Posts: 3
- Joined: Thu 03 Apr 2014 06:13
Re: ScSFTPClient DownloadFile error
Does not work: I get a download error.
Re: ScSFTPClient DownloadFile error
Please, specify the exact step from the post above when the problem is reproduced.
Re: ScSFTPClient DownloadFile error
I just ran into this same problem trying to download short message files from a large corporate website. The server kept giving me the annoying and useless "cannot be extracted" message. I tried the suggestion here to open a handle, retrieve the attributes and then read the file, but the "cannot be extracted" message continued. It got past the RetrieveAttributesByHandle ok, but failed on the ReadFile. I removed the RetrieveAttributesByHandle and that solved the problem. It may be that freeing and reopening the handle will allow you to get both the Attributes and Read the file, but I haven't tried that. I'm not concerned with the attributes, just the file content.
Regardless, whoever runs the server has a fairly buggy implementation of SFTP!
MV
Regardless, whoever runs the server has a fairly buggy implementation of SFTP!
MV
Re: ScSFTPClient DownloadFile error
Thank you for the information. We will investigate this behavior of SecureBridge.
Please specify the exact SFTP server version you are using.
Please specify the exact SFTP server version you are using.