Uploads a local file to the FTP server remote directory.

Namespace: Jscape.Ftp
Assembly: Jscape.Ftp (in Jscape.Ftp.dll) Version: 2.4.5.0

Syntax

C#
public virtual void Upload(
	string localFile
)
Visual Basic
Public Overridable Sub Upload ( _
	localFile As String _
)
Visual C++
public:
virtual void Upload(
	String^ localFile
)

Parameters

localFile
Type: System..::..String
The local file (or directory) to upload.

Remarks

If the local file is a directory then the directory and all the contents are uploaded relative to the remote directory.

Examples

The following example uploads the ico_test.gif file from the local directory to the remote directory on the FTP server.
CopyC#
myFtp.Upload("ico_test.gif");

Copy 
myFtp.Upload("ico_test.gif")

Exceptions

ExceptionCondition
Jscape.Ftp..::..FtpExceptionIf an I/O or FTP error occurs.

See Also