Main Content


Remove attachment from MDF-file



    mdfRemoveAttachment(mdfFile, attachmentFile) removes the attachmentFile from the specified mdfFile.

    To remove multiple files, call this function separately for each file.


    This function does not support MDF3 files.


    collapse all

    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");
    ans =
    ans =
    ans =

    Remove the unwanted attachment.


    Input Arguments

    collapse all

    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.

    Example: "MDF_25Dec.mf4"

    Data Types: char | string

    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 mdfInfo.

    Example: "Inv_MDF_25Dec.txt"

    Data Types: char | string

    Version History

    Introduced in R2022a

    See Also