Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Archive.Close

Closes the current archive.

Component Version macOS Windows Linux Server iOS SDK
Archive 13.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Archive.Close" { ; FileName } )   More

Parameters

Parameter Description Example Flags
FileName The filename for the zip to use.
Only for when we return a container.
"test.zip" Optional

Result

Returns OK, container value or error.

Description

Closes the current archive.
For file based archives, the file is closed and OK returned.
For container based archives, we return the final container value.

Examples

Create a zip as container value and store it:

Set Variable [ $r ; Value: MBS( "Archive.Create"; "zip"; "deflate") ]
If [ MBS("IsError") ]
    Show Custom Dialog [ "Failed to create zip archive." ; $r ]
    Exit Script [ Text Result: ]
End If
#
Go to Record/Request/Page [ First ]
Set Variable [ $destPage ; Value: 1 ]
Loop
    Set Variable [ $r ; Value: MBS( "Archive.AddContainer"; Merge PDFs::InputPDF) ]
    Go to Record/Request/Page [ Next ; Exit after last: On ]
End Loop
Set Variable [ $zip ; Value: MBS( "Archive.Close"; "test.zip") ]
If [ MBS("IsError") ]
    Show Custom Dialog [ "Failed to create zip archive." ; $r ]
Else
    Set Field [ Merge PDFs::FinalPDF ; $zip ]
End If

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 13th February 2023, last changed 17th February 2023


Archive.BZip2Version - Archive.Compress