SFTP Upload in VB6 with Progress Monitoring

The PercentDone event is called when the percentage completion increases by one or more points.  To use events in VB6, Dim the variable WithEvents.  Then name the event callback using the variable name.  (You should already understand how to use VB6 events in general prior to using the Chilkat objects.  A good VB6 book is “Programming Visual Basic 6.0” by […]

SFTP Server Error Messages – sometimes obscure and misleading

Two recent customer support issues prompted this post.  In both cases, the error reported by the SFTP server was both lacking in information as well as somewhat misleading.  One brand of server was: SSH-2.0-http://www.sshtools.com J2SSH [SERVER] The other was: SSH-2.0-WS_FTP-SSH_7.1 With the 1st SSH server, the following error occurred when trying to open a file: OpenFile: DllDate: Jun 10 2009 […]

SFTP GetFileSize32 returns 4294967295

Question: I have an issue with the SFTP component. When using the GetFileSize32 it returns 4294967295 for a file with length of 1324 bytes. L When using the GetFileSizeStr it returns Nothing for a file with length of 1324 bytes. L Answer: GetFileSize32 returns -1 when it fails, so I suspect that if your variable is unsigned, -1 will appear […]

SFTP WS_FTP OpenFile “Folder not found” Error

If you pass a filename with no path to the SFTP OpenFile method, and the SFTP server is WS_FTP, you may get a “Folder not found” error. An SFTP server *should* open or create the file in the home directory of the logged-in account. This doesn’t seem to be the case with the WS_FTP server. The fix is to call […]

Unlocking Chilkat SFTP

To use Chilkat SFTP (Secure File Transfer over SSH) you must use the unlock code for Chilkat SSH.  It should contain the substring “SSH”.  If your unlock code contains the string “FTP”, then you are using the FTP2 unlock code, which is incorrect. The SFTP component/API is part of  the “Chilkat SSH” license: “SFTP” is the Secure File Transfer Protocol […]

SFTP Progress Monitoring in C++

This C++ example demonstrates how to derive a class from the CkSFtpProgress base class to implement progress monitoring and abort for SFTP: // To monitor SFTP progress, derive a class from CkSFtpProgress and // provide implementations for AbortCheck and PercentDone: class MySFtpProgress : public CkSFtpProgress { public: MySFtpProgress() { } virtual ~MySFtpProgress() { } // Called periodically during any SFTP […]

SFTP – Change Current Directory

Question: I need to change directory before uploading (like a cd) since files must be copied into server sub-directories, and I’ve not found any sample or idea ( no ChangeDir or similar). Answer: SFTP is Secure File Transfer over SSH. It is not the FTP protocol. There is no similarity or relationship between FTP and SFTP. Therefore, concepts such as […]

Understanding SFTP Absolute FilePaths

Given that your SFTP client might be communicating with servers on different operating systems, what is the proper syntax for an absolute filepath? On a Linux system, there is no “C” drive. Let’s do some experimentation…. For this experiment, we have two SSH servers: 1) A Tectia server running on a Windows platform. 2) An OpenSSH server running on Ubuntu […]

SFTP Download Files Matching a Pattern

Question: I am trying your component to check if I can integrate it well in an application I need to transfer and manage files using SFTP over SSH. I’ve examined the samples and there’s one thing I’d like to do and cannot find it. Is it possible to read remote folder content but limited only to those items matching a […]