Remove attachment from MDF-file
attachmentFile from the specified
To remove multiple files, call this function separately for each file.
This function does not support MDF3 files.
Remove Attachment from MDF-File
Identify the files attached to an MDF-file and remove the unwanted one.
List the attached files from the MDF-file information struct.
info = mdfInfo("MDFFile.mf4"); info.Attachment.Name
ans = 'inv_prelim.txt' ans = 'inv_final.txt' ans = 'inv_temp.txt'
Remove the unwanted attachment.
mdfFileName — MDF-file name
string | char
MDF-file name, specified as a string or character vector, to remove the attachment from. The file name can be a relative or absolute path.
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.
attachmentFile — File to be removed
string | char
File to be removed, specified as a string or character vector. To precisely identify
the attachment to remove, the specified file name string must exactly match the
attachment name as stored in the MDF-file, which can be found in the
Attachment.Name field of the file information struct returned by
Version HistoryIntroduced in R2022a
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.