Save embedded attachment files from MDF-file
mdfSaveAttachment( saves all the
embedded attachments from the specified MDF-file to the current MATLAB working folder. The
attachments are saved with their existing names.
mdfFileName specifies an
absolute, relative, or URL path to the MDF-file. The MDF-file itself can be on a remote
server, but the attachments saved by
mdfSaveAttachment are local
saves only those attachments specified by attachment ID, indicating an attachment numerical
index or string name. Specify multiple indices or strings in an array.
specifies the location for the saved files.
Save Attachments from an MDF-File
Given the MDF-file
MDFFie.mf4, save its embedded
For a local file, save all its embedded attachments to the current working folder.
For a file on a remote server, save all its attachments to the current working folder.
Save specified embedded attachments to the current working folder.
mdfSaveAttachment("MDFFile.mf4", Attachment=["Attachment1.ext", "Attachment2.ext"]) mdfSaveAttachment("MDFFile.mf4", Attachment=[1, 3, 4])
Save all attachments to a specified folder.
mdfFileName — MDF-file name
string | char vector
MDF-file name, specified as a string or character vector, including the necessary full or relative path. You can use a URL to specify a file on a remote server.
Depending on the location you are accessing,
mdfFileName can take one of these forms.
|Current folder or MATLAB® path|
To access a file in the current folder or MATLAB path, specify the
name of the file in
To access a file in a folder other than the current folder, specify
the full or relative path name in
To access a file in a remote location,
Based on the remote location,
For more information, see Work with Remote Data.
attachmentID — Name or index of attachment to save
string | char | numerical
Names or indices of attached files to save. To save a single attachment, specify
attachmentID as a string, character vector, or numerical index
value. To save multiple attachments, specify
attachmentID as a string
vector, cell array of character vectors, or numerical vector.
outputFolder — Location for saved files
string | char
Location for saved attachments, specified as a string or character vector identifying a full or relative path.
Version HistoryIntroduced in R2023a
R2023a: Support for Remote File URLs
You can directly access MDF-file data stored at remote locations, including Amazon S3, Azure® Blob Storage, and HDFS.