Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

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

💬 Ask a question or report a problem