Upload file or folder to FTP server
paths = mput(ftpobj,contents)
FTP object created by ftp.
String enclosed in single quotation marks that specifies either a file name or a folder name. Can include a wildcard character (*).
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);