ftp_mput()

Description:

Upload multiple files onto a FTP server.

Syntax:

ftp_mput(client,serverFolder,localFolder,multiLocalFiles)

Note:

This is an external library function (See External Library Guide). When parameter serverFolder is a relative path, it is relative to the current working directory; when it is preceded by a slash sign (/), it is an absolute path. When the parameter is absent, the comma must be retained. If the parameter is an empty string or is absent, the folder path is relative to the current working directory.

 

When parameter localFolder is a relative path, it is relative to the path configured in esProc Options -> Main directory. When the parameter is absent, the comma must be retained. If the parameter is an empty string or is absent, the folder path is relative to the path configured in esProc Options -> Main directory.

 

For a wildcard character, the question mark (?) signifies a single character, an asterisk (*) signifies any character, and double asterisk (**) signifies any character plus a directory.

Option:

@f

Overwrite a namesake file

@t

Skip a namesake file

Parameter:

client

An FTP client object

serverFolder

A server folder

localFolder

A local folder

multiLocalFiles

Wildcard-specified server files; can be duplicated

Example:

 

A

 

1

=ftp_open("192.168.75.1":21,"Administrator","admin")

 

2

=ftp_cd(A1,"/ WorkingDirectory ")

 

3

=ftp_mput@f(A1,"folder1","G:/upload","*.doc")

Upload files suffixed by doc under G:/upload directory to folder1 directory while overwriting namesake files.

4

=ftp_mput@f(A1,"folder1","G:/upload","*.xls","*.xlsx")

Upload files suffixed by xls and xlsx under G:/upload directory to folder1 directory.

5

=ftp_mput@f(A1,"folder1","G:/upload ","**")

Upload all files under G:/upload directory to folder1 directory.

6

=ftp_mput@t(A1,"folder2","G:/upload,"*.docx")

Upload files suffixed by docx under G:/upload directory to folder2 directory while skipping namesake files.

7

>ftp_close(A1)