ftp_cd()

Description:

Set the remote working directory/directories on the FTP server.

Syntax:

ftp_cd(client,remotePath)

Note:

External library function (See External Library Guide). The parameter remotePath can be omitted when there’s only one remote working directory.

Parameter:

client

An FTP client object

remotePath

The path name of a remote working directory; when it is omitted, the remote working directory on the FTP server is by default regarded as the root directory

Example:

 

A

 

1

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

 

2

=ftp_cd(A1,"/folder1")

Set /folder1 as the remote working directory.

3

=ftp_put(A1,"test.txt","G:/Test.txt")

 

4

>ftp_close(A1)

 

Related function:

ftp_dir()