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: 10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4   11.5    Statistic    FMM    Blog  

UnZipFile.ExtractFiles

Extracts all files from current archive into a folder.

Component Version macOS Windows Linux Server iOS SDK
Compression 6.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes

Deprecated

This function was deprecated. Use Archive.Extraxct instead.

MBS( "UnZipFile.ExtractFiles"; destFolder { ; ExtractWithoutPath; Overwrite } )   More

Parameters

Parameter Description Example Flags
destFolder The native path to the destination folder.
Please make sure this folder exists.
"/Users/cs/Desktop/test"
ExtractWithoutPath If 1, all files are put in one folder and no subfolders are created. 0 Optional
Overwrite Pass 1 to allow files to be overwritten.
Default is 0 to not overwrite.
Optional

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

Blog Entries

FileMaker Magazin

Created 16th January 2016, last changed 12nd June 2020


UnZipFile.Close - UnZipFile.GlobalComment

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins

Start Chat