MATLAB Function Reference Previous page   Next Page

Connect to FTP server, creating FTP object



f = ftp('host','username','password') connects to the FTP server, host, creating the FTP object, f. If a username and password are not required for an anonymous connection, only use the host argument. Specify an alternate port by separating it from host using a colon (:). After running ftp, perform file operation functions on the FTP object, f, using methods such as cd and others listed under "See Also." When you're finished using the server, run close (ftp) to close the connection.

The ftp function is based on code from the Apache Jakarta Project.


Connect Without Username

Connect to, which does not require a username or password. Assign the resulting FTP object to tmw. You can access this FTP site to experiment with the FTP functions.

MATLAB returns

Connect to Specified Port

To connect to port 34, type

Connect with Username

Connect to and assign the resulting FTP object to test.

MATLAB returns

See Also

ascii (ftp), binary (ftp), cd (ftp), delete (ftp), dir (ftp), close (ftp), mget (ftp), mkdir (ftp), mput (ftp), rename (ftp), rmdir (ftp)

Previous page  ftell full Next page

© 1994-2005 The MathWorks, Inc.