%% Change Folder
% Connect to an FTP server and navigate to a folder on that server.
% First, connect to the National Centers for Environmental Information (NCEI) FTP server.

ftpobj = ftp('ftp.ngdc.noaa.gov')

%
% Display the contents of the top-level folder. It contains another folder named pub.

dir(ftpobj)

%
% Change folders to the pub folder. Then display its contents.

cd(ftpobj,'pub')

%

dir(ftpobj)

%
% FTP service courtesy of the National Centers for Environmental Information (NCEI). See the NCEI Privacy Policy, Disclaimer, and Copyright for NCEI terms of service.
% Copyright 2012 The MathWorks, Inc.