Please enable JavaScript to view this site.

ESL Documentation

ESLWEB Subroutine

Transfer a file to a FTP Server.

call FTP_Put (        FTP_URL_SV,
                 FTP_LocalFile_SV,
                 FTP_RemoteFile_SV,
                 FTP_Userid_SV,
                 FTP_Password_SV

                 FTP_Overwrite_BV,

                 FTP_Passive_BV)

Parameters

FTP_URL_SV

A string variable containing  the name of the FTP server.

 

FTP_RemoteFile_SV

A string variable containing the name of the file on the Host to be created or overwritten with the file sent from the workstation.

 

FTP_LocalFile_SV

A string variable containing the name of the file on the workstation to be sent to the Host.

 

FTP_Userid_SV

The User identifier for the FTP server. This can be a NULL string, if the server supports anonymous login.

 

FTP_Password_SV

The Password credential for the User identifier. This can be a NULL string, if the server supports anonymous login.

 

FTP_Overwrite_BV

A boolean variable, which, if set to true, will allow an existing file to be overwritten.

 

FTP_Passive_BV

A boolean variable, which when set to true, switches the FTP transfer mode to "Passive".

 

Description

This function uses the internet standard File Transfer Protocol (FTP) to copy files from the workstaion to a specified Server. This routine supports both the Active and Passive transfer mode. To ensure compatible with your firewall settings, set the "Passive" variable to true. The files are transferred as binary, so any type of file content is supported.

As any relative path used to specify a file will be dependent on the Current Directory, it is recommend that the full (Absolute) path be used.

To determine whether the routine has been successful, the value of the built-in function "errorlevel" should be examined. If the routine has failed (i.e. errorlevel != FTP_E_ERRORFREE), there is also an error message recorded in the "errorlog".

 

FTP_E_ERRORFREE

No errors encounter the transfer was successful.

FTP_E_LOGINDENIED

The login requires User Id and Password credentials.

FTP_E_BADPASSWORD

The login credentials are not valid.

FTP_E_NOLOCAL

The local file has not be specified.

FTP_E_BADLOCALFILE

Local Source File does not exist.

FTP_E_CANTWRITE

Target File is write-protected.

FTP_E_NOREMOTE

Remote File has not been specified.

FTP_E_REMOTEFILEEXISTS

Remote Target File exists but overwrite not specified.

FTP_E_CONNECTIONFAILED

Connection lost before transfer complete.

FTP_E_SERVERNOTFOUND

Specified Server could not be resolved.

FTP_E_BADLOCALPATH

Local Target File path does not exist.

FTP_E_BADREMOTEPATH

Remote Target File path does not exist.

FTP_E_DISKFULL

Disk has no more space for writing target file.

FTP_E_FILELOCKED

File locked by another program.

FTP_E_NOSERVER

Server not specified.

FTP_E_BADSERVER

Server parameter incorrect.

FTP_E_CONNECTION_ERROR

Failed to connect to the specified Server

FTP_E_ERROR

Unknown error has occurred.