Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

FTPPut

  • Last UpdatedOct 29, 2026
  • 2 minute read

FTPPut is a built-in function that puts a file from the local computer on an FTP server.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

FTPPut

FTP

Asynchronous

No

Supported

Supported

Not supported

Supported (see Notes below)

Not supported

Syntax

FTPPut(strLocalFile,strRemoteFile,optNumTransferType )

strLocalFile

The full path and name of the file on the local machine that you want to put on the FTP server, using the syntax "C:\folder\filename.extension".

strRemoteFile

The full path and name where you want to put the file on the FTP server, using the syntax "/folder/filename.extension". Some FTP servers are case sensitive, so you should always use correct capitalization.

optNumTransferType

A numeric flag that specifies the type of file transfer:

Value

Description

0

Unknown (default).

1

ASCII.

2

Binary.

This parameter is optional; if no value is specified, the transfer type is unknown (0) by default.

Returned value

This function returns one of the following possible values:

Value

Description

-5

Invalid transfer type.

-4

Invalid local file.

-3

Invalid remote file.

-2

Unknown system error.

-1

Invalid number of parameters.

0

Success.

1

Failed to create FTP thread or open connection to the server.

15

Data Protection is enabled (see Notes below).

Notes

This function requires a configured FTP connection, either using the FTP Settings dialog box or from calling the CnfFTP function.

This function is executed asynchronously, so if you want to confirm that the transfer is complete, call FTPStatus.

This function cannot be executed on thin clients (in the Viewer module) when Data Protection is enabled. It must be executed on the project runtime server. For more information, see Enable Data Protection to encrypt sensitive information.

Examples

Put the file Report.txt on the previously specified FTP server at /Reports/040303.txt:

FTPPut("C:\Report.txt","/Reports/040303.txt")

In This Topic
Related Links