Example
| Sub Main ' Pass a domain or IP address.. Dim success As Long success = sftp.Connect("my-sftp-server.com",22) If (success = 1) Then success = sftp.AuthenticatePw("mySFtpLogin","mySFtpPassword") End If If (success = 1) Then success = sftp.InitializeSftp() End If If (success <> 1) Then Debug.Print sftp.LastErrorText Exit Sub End If ' Create a hard link on the server. ' We'll create the hard link named "somefile2.txt" in our HOME directory ' which links to the file somefile.txt also in our HOME directory. success = sftp.HardLink("somefile.txt","somefile2.txt") If (success <> 1) Then Debug.Print sftp.LastErrorText Exit Sub End If Debug.Print "Successfully created hard link." End Sub
|