ftp_cd()

Description:

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

Syntax:

ftp_cd(client,remotePath)

Note:

External library function. The parameter remotePath can be omitted when there’s only one remote working directory.

Parameters:

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_client("192.168.75.1":21,"Administrator","admin")

 

2

=ftp_cd(A1,"/folder1")

Set /folder1 as the remote working directoy

3

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

 

4

>ftp_close(A1)

 

Related functions:

ftp_dir()