Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

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

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

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

target

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

Examples

Connect to the National Geophysical Data Center (NGDC) FTP server and retrieve the file README.txt into the current MATLAB folder:

ngdc = ftp('ftp.ngdc.noaa.gov');
mget(ngdc,'README.txt');
close(ngdc);

FTP service courtesy of the NGDC. See NGDC Privacy Policy, Disclaimer, and Copyright for NGDC terms of service.

See Also

| |

Introduced before R2006a

Was this topic helpful?