UnZipFile.OpenFile
------------------

Opens a zip archive file.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Compression](component_Compression.md) | [3.4](newinversion34.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md). Use [Archive.Extract](ArchiveExtract.md) instead.

MBS( "UnZipFile.OpenFile"; Path ) 

**MBS**( **"UnZipFile.OpenFile";** /\* Opens a zip archive file. \*/  
**$Path**) /\* Native file path. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | Native file path. | $path |

### Result

Returns OK or error.

### Description

Opens a zip archive file.  
The plugin reads the directory so you can use [UnZipFile.ItemCount](UnZipFileItemCount.md) function to learn the number of items.  
  
Deprecated due to missing unicode support. Please use [Archive.Extract](ArchiveExtract.md) for new projects.  
  
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

Open archive on Windows:

 MBS ( "UnZipFile.OpenFile"; "c:\\folder\\test.zip" )  
Open Archive and expand:

 MBS ( "UnZipFile.OpenFile"; "C:\\Users\\Christian\\Desktop\\MBSFMPlugins153.zip")  
MBS ( "[UnZipFile.ExtractFiles](UnZipFileExtractFiles.md)"; "C:\\Users\\Christian\\Desktop\\test")  
### See also

- [Archive.Extract](ArchiveExtract.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)
- [UnZipFile.ExtractFiles](UnZipFileExtractFiles.md)
- [UnZipFile.ItemCount](UnZipFileItemCount.md)
- [WordFile.OpenFile](WordFileOpenFile.md)
- [ZipFile.Open](ZipFileOpen.md)

### Example Databases

- [Archives/Show Zip File Content](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Archives/Show%20Zip%20File%20Content.shtml#3ScriptAnchor_)

### Blog Entries

- [Comparing Base Elements Plugin to MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2017-10-24/Comparing_Base_Elements_Plugin/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2013, Seite 31](https://filemaker-magazin.de/neuigkeit/3712-Appetithappen-FMM_201306)

This function checks for a license.

Created 18th August 2014 , last changed 7th February 2023

  
[UnZipFile.OpenContainer](UnZipFileOpenContainer.md) - [UnZipFile.ReadAsFileContainer](UnZipFileReadAsFileContainer.md)

[HTML Version](UnZipFileOpenFile.shtml)