cd (ftp) - Change current directory on FTP server

Syntax

cd(f)
cd(f,'dirname')
cd(f,'..')

Description

cd(f) Displays the current directory on the FTP server f, where f was created using ftp.

cd(f,'dirname') Changes the current directory on the FTP server f to dirname, where f was created using ftp. After running cd, the object f remembers the current directory on the FTP server. You can then perform file operations functions relative to f using the methods delete, dir, mget, mkdir, mput, rename, and rmdir.

cd(f,'..') changes the current directory on the FTP server f to the directory above the current one.

Examples

Connect to the MathWorks FTP server.

tmw=ftp('ftp.mathworks.com');

View the contents.

dir(tmw)

Change the current directory to pub.

cd(tmw,'pub');

View the contents of pub.

dir(tmw)

See Also

dir (ftp), ftp

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS