Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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

Character vector or string 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:

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

See Also

| | |

Introduced before R2006a

Was this topic helpful?