West Wind Internet and Client Tools
FtpSendFileEx downloads empty files
Gravatar is a globally recognized avatar based on your email address. FtpSendFileEx downloads empty files
  riccardo
  All
  Sep 15, 2023 @ 12:18am

Good morning, I'm carrying out tests with the SFTP library, and I downloaded the demo version. I can execute all the instructions, except FtpGetFileEx, which returns empty files. In summary:

  • I successfully connect to the SFTP server via FtpConnect Statement
  • I move to the desired directory via FtpSetDirectory
  • I loop through the files present via FtpListFiles
  • For each file I download via FtpGetFileEx
  • I upload via FtpSendFileEx

Uploading the file correctly, I don't think there are any firewall problems, could it be the use of the demo version? Thank you

Gravatar is a globally recognized avatar based on your email address. re: FtpSendFileEx downloads empty files
  riccardo
  riccardo
  Sep 15, 2023 @ 03:29am

Hi, I found the problem. Even though it is correctly inside the directory where the files are contained, in fact the FtpListFiles command returns me the correct files, I must also specify the complete directory in the FtpGetFileEx instruction.

So in the first parameter, instead of specifying only the name of the file to download, I also had to add the complete path of the SFTP server.

Thanks

© 1996-2024