Documentation Center

  • Trial Software
  • Product Updates
我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

mget

Class: FTP

Download files from FTP server

Syntax

mget(ftpobj,contents)
mget(ftpobj,contents,target)

Description

mget(ftpobj,contents) retrieves the file or folder specified by contents from an FTP server into the MATLAB® current folder.

mget(ftpobj,contents,target) retrieves the file or folder into the local folder specified by target, which includes an absolute or relative path.

Input Arguments

ftpobj

FTP object created by ftp.

contents

String enclosed in single quotation marks that specifies either a file name or a folder name. Can include a wildcard character (*).

target

String enclosed in single quotation marks that specifies the absolute or relative path of the local folder to contain the downloaded contents.

Examples

Connect to an FTP server and retrieve the file README into the current MATLAB folder:

mw = ftp('ftp.mathworks.com');
mget(mw, 'README');
close(mw);

See Also

| |

Was this topic helpful?