PowerTCP FTP for .NET
Put(String,String,Synchronize) Method
Example 



Path to the local file to upload.
Absolute or relative destination filepath.
The file synchronization technique desired, if any.
Upload a file to an FTP server.
Syntax
Public Overloads Function Put( _
   ByVal localPath As String, _
   ByVal remotePath As String, _
   ByVal sync As Synchronize _
) As CopyResult
Dim instance As Ftp
Dim localPath As String
Dim remotePath As String
Dim sync As Synchronize
Dim value As CopyResult
 
value = instance.Put(localPath, remotePath, sync)
public CopyResult Put( 
   string localPath,
   string remotePath,
   Synchronize sync
)
public:
CopyResult^ Put( 
   String^ localPath,
   String^ remotePath,
   Synchronize sync
) 

Parameters

localPath
Path to the local file to upload.
remotePath
Absolute or relative destination filepath.
sync
The file synchronization technique desired, if any.

Return Value

CopyResult containing the result of the operation.
Remarks

DataIsBusy returns true while this method executes.

Characters specified in the remote path are sent to the server unmodified. If the path contains characters that are invalid for the server host filesystem, it may cause the operation to fail with an FtpProtocolException.

Example
This example demonstrates using the FTP control to store a file using the FTP STOR Command. For details on displaying file transfer progress see the Ftp.Progress event.
private void putFile()
{
    ftp1.Put(myLocalDirectory + "\\testfile.txt", "testfile.txt", Synchronize.Off);
}
Private Sub putFile()
    ftp1.Put(myLocalDirectory & "\testfile.txt", "testfile.txt", Synchronize.Off)
End Sub
See Also

Reference

Ftp Class
Ftp Members
Overload List


PowerTCP FTP for .NET Documentation Version 6.1
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic