From MATLAB®, you can connect to an FTP server to perform remote file operations. The following procedure uses a public MathWorks® FTP server (ftp.mathworks.com). To perform any file operation on an FTP server, follow these steps:
List the contents of the MathWorks FTP server and retrieve a file named README To view the file, use the type function.
tmw = ftp('ftp.mathworks.com'); dir(tmw) mget(tmw,'README'); type README
Welcome to the MathWorks FTP site! The MathWorks FTP site has a new structure: /incoming - where you upload files to /outgoing - where you pick up files from NOTE: Files in the above directories will be removed after 30 days. You may also want to visit the MathWorks Web site at http://www.mathworks.com Send questions/comments/suggestions to email@example.com
View the contents of the pub folder:
cd(tmw,'pub') dir(tmw) % Close the connection close(tmw)