close

Close the FTP connection to the server.

Attention: Available only with Twin Activate commercial edition.

Syntax

close(ftpObj)

Inputs

ftpObj
FTP object
Type: FTP object

Example

Close the FTP connection after getting the contents of the remote location:
% Create the FTP object and get the contents
ftpObj = ftp('ftp://127.0.0.1:60000','user', 'password');
ret = dir(ftpObj);
% Close the FTP connection
close(ftpObj);

Comments

If the connection is closed, the FTP object becomes invalid and can no longer be used as an argument in an ftp command.