mget(ftpobj,contents)
mget(ftpobj,contents,target)
mget(
retrieves
the file or folder specified by ftpobj
,contents
)contents
from
an FTP server into the MATLAB® current folder.
mget(
retrieves
the file or folder into the local folder specified by ftpobj
,contents
,target
)target
,
which includes an absolute or relative path.
|
FTP object created by |
|
Character vector enclosed in single quotation marks that specifies
either a file name or a folder name. Can include a wildcard character
( |
|
Character vector enclosed in single quotation marks that specifies the absolute or relative path of the local folder to contain the downloaded contents. |
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.