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:
11.4
11.5
12.0
12.1
12.2
12.3
12.4
12.5
13.0
13.1
Statistic
FMM
Blog
Archive.AddContainer
Adds a container value to the current archive.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Archive | 13.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
Container | The container to compress. We take the file name from container. |
||
FileName | The file name to use. May contain relative path parts. Pass empty to take file name from container. |
"Documents/test.txt" | Optional |
Result
Returns OK or error.
Description
Adds a container value to the current archive.Please use Archive.Create before adding the first file and use Archive.Close after the last file to finish.
Filename is picked from the container.
Examples
Compress PDF containers into a zip file:
Set Variable [ $path ; Value: MBS( "Path.AddPathComponent"; MBS( "Folders.UserDesktop" ); "test.zip" ) ]
Set Variable [ $r ; Value: MBS( "Archive.Create"; "zip"; "deflate"; $path) ]
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 [ $r ; Value: MBS( "Archive.Close") ]
See also
Release notes
- Version 13.1
- Added Archive.Create, Archive.AddContainer, Archive.AddFile, Archive.AddText and Archive.Close functions.
Example Databases
Blog Entries
- Build archives on the fly
- MBS FileMaker Plugin, version 13.1pr4
- MBS FileMaker Plugin, version 13.1pr3
This function checks for a paid license.
Created 13th February 2023, last changed 17th February 2023
Applescript.DeterminePermissionToAutomateTarget - Archive.AddFile
