mput

Class: FTP

Upload file or folder to FTP server

Syntax

mput(ftpobj,contents)
paths = mput(ftpobj,contents)

Description

mput(ftpobj,contents) uploads the file or folder specified by contents to the current folder on an FTP server.

paths = mput(ftpobj,contents) returns a cell array that lists the paths to the uploaded files on the server.

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 (*).

Output Arguments

paths

Cell array that includes the paths to the uploaded files on the server.

Examples

Suppose that your current MATLAB® folder contains files myfile1.m through myfile10.m, and that you want to upload to a hypothetical FTP server, ftp.testsite.com. Connect to the server and upload the files:

test = ftp('ftp.testsite.com');
mput(test, 'myfile*.m');
close(test);

See Also

| | |

Was this topic helpful?