cd

Class: FTP

Change or view current folder on FTP server

Syntax

cd(ftpobj,folder)
cd(ftpobj)

Description

cd(ftpobj,folder) changes the current folder on the FTP server.

cd(ftpobj) displays the current folder on the server.

Input Arguments

ftpobj

FTP object created by ftp.

folder

String enclosed in single quotation marks that specifies the target folder. To specify the folder above the current one, use '..'.

Examples

Connect to the MathWorks® FTP server, change to the pub folder, and view its contents:

mw=ftp('ftp.mathworks.com');
cd(mw,'pub');
dir(mw)

See Also

|

Was this topic helpful?