Topics
All
Mac OS X
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Guides
Examples
New in version:
7.4
7.5
8.0
8.1
8.2
8.3
8.4
8.5
9.0
9.1
Statistic
UnZipFile.ExtractFiles
Extracts all files from current archive into a folder.
Component | Version | macOS | Windows | Server | FileMaker Cloud | FileMaker iOS SDK |
Compression | 6.0 | Yes | Yes | Yes | No | Yes |
Parameters
Parameter | Description | Example value |
---|---|---|
destFolder | The native path to the destination folder. Please make sure this folder exists. |
"/Users/cs/Desktop/test" |
ExtractWithoutPath | Optional If 1, all files are put in one folder and no subfolders are created. |
0 |
Overwrite | Optional Pass 1 to allow files to be overwritten. Default is 0 to not overwrite. |
Result
Returns OK or error.
Description
Extracts all files from current archive into a folder.Please use UnZipFile.OpenContainer and UnZipFile.OpenFile to open the archive first.
This function does not restore file permissions or other metadata.
And it may not work with non ASCII characters.
If you need more control over files being extracted, stored or error checking, please check example database coming with plugin.
Deprecated. Please use Archive.Extraxct for new projects.
This function requires a native path. Use Path.FileMakerPathToNativePath 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 functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
Examples
Opens archive and expands files:
Set Variable [$r; Value:MBS( "UnZipFile.OpenFile"; "/Users/cs/Desktop/test.zip" )]
If [$r = "OK"]
Set Variable [$r; Value:MBS( "UnZipFile.ExtractFiles"; "/Users/cs/Desktop/test"; 0 )]
Set Variable [$r; Value:MBS( "UnZipFile.Close" )]
End If
Expand files on Windows:
Set Variable [$r; Value:MBS( "UnZipFile.OpenFile"; "C:\Users\Christian\Desktop\DebugView.zip" )]
If [$r = "OK"]
Set Variable [$r; Value:MBS( "UnZipFile.ExtractFiles"; "C:\Users\Christian\Desktop\test"; 0 )]
Set Variable [$r; Value:MBS( "UnZipFile.Close" )]
End If
See also
- Path.FileMakerPathToNativePath
- UnZipFile.Close
- UnZipFile.OpenContainer
- UnZipFile.OpenFile
- ZipFile.Close
- ZipFile.Open
Blog Entries
Created 16th January 2016, last changed 12nd February 2019
UnZipFile.Close - UnZipFile.GlobalComment
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins