Container.ReadArchive
---------------------

Reads an archived container.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Container](component_Container.md) | [4.4](newinversion44.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Container.ReadArchive"; Path ) 

**MBS**( **"Container.ReadArchive";** /\* Reads an archived container. \*/  
**$Path**) /\* Native path to the archive file to use.e.g. "C:\\Benutzer\\Christian\\Desktop\\test.txt" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | Native path to the archive file to use. | "C:\\Benutzer\\Christian\\Desktop\\test.txt" |

### Result

Returns OK or error.

### Description

Reads an archived container.  
Please use [Container.WriteArchive](ContainerWriteArchive.md) to create the archive. The zip file must have a special format to be read successful, so probably only archives created by [Container.WriteArchive](ContainerWriteArchive.md) will work.  
This works for any content of a container, except for referenced container files.  
  
This function requires a native path. Use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use [FileDialog](component_FileDialog.md) functions.  
For Server be aware that server has limited permissions and may not be able to access all files on a computer.  
### Examples

Reads an archive:

 MBS ("Container.ReadArchive"; "C:\\Benutzer\\Christian\\Desktop\\test.txt")  
Writes an archive:

 MBS ("[Container.WriteArchive](ContainerWriteArchive.md)"; MyTable::MyContainer ; "C:\\Benutzer\\Christian\\Desktop\\test.txt")  
### See also

- [Container.ReadFile](ContainerReadFile.md)
- [Container.WriteArchive](ContainerWriteArchive.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)

### Example Databases

- [Containers/Archive Container](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Containers/Archive%20Container.shtml#2ScriptAnchor_)

This function checks for a license.

Created 21st September 2014 , last changed 21st September 2014

  
[Container.IsCompressed](ContainerIsCompressed.md) - [Container.ReadFile](ContainerReadFile.md)

[HTML Version](ContainerReadArchive.shtml)