SFTP Object
 
Syntax
 
SFTP.HardLink(oldPath As String, newPath As String) As Long
 
Description
Creates a hard link on the server using the hardlink@openssh.com extension. This only works for SFTP servers that support the hardlink@openssh.com extension.
 
Returns 1 for success, 0 for failure.
 
See Also

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