Archive.FileList
----------------

Lists file paths in the archive.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Archive](component_Archive.md) | [9.0](newinversion90.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Archive.FileList"; Archive { ; Passphrase; Options } ) 

**MBS**( **"Archive.FileList";** /\* Lists file paths in the archive. \*/  
**$Archive**; /\* Either container with archive or native file path.e.g. "C:\\test\\test.zip" \*/   
**$Passphrase**; /\* Optional; Password to use. \*/   
**$Options**) /\* Optional; The options to pass to reader.  
This is a comma-separated list of options. Option names can be prefixed with module name. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Archive | Either container with archive or native file path. | "C:\\test\\test.zip" |  |
| Passphrase | Password to use. |  | Optional |
| Options | The options to pass to reader.   This is a comma-separated list of options. Option names can be prefixed with module name. |  | Optional      Added in version **14.3**. |

### Result

Returns list or error.

### Description

Lists file paths in the archive.  
Please use [Archive.Content](ArchiveContent.md) if you need more details.  
This provides file list, which you can filter and then pass to [Archive.Extract](ArchiveExtract.md).  
### Examples

Get file list:

 Set Variable \[ $list ; Value: MBS ("Archive.FileList"; If(IsEmpty($Path ); $Container ; $Path )) \]   
If \[ MBS ("IsError") \]   
 Show Custom Dialog \[ "Failed to read container" ; $list \]   
Else  
 Set Variable \[ $Content ; Value: MBS ("[JSON.Colorize](JSONColorize.md)"; $list ) \]   
End If  
List files with using Windows ANSI encoding:

 MBS ( "Archive.FileList"; "/Users/cs/Desktop/test.zip"; ""; "hdrcharset=cp1252")  
List files with using Japanese CodePage text encoding for older zip archive:

 MBS ( "Archive.FileList"; "/Users/cs/Desktop/test.zip"; ""; "hdrcharset=cp932")  
### See also

- [Archive.Content](ArchiveContent.md)
- [Archive.Extract](ArchiveExtract.md)
- [Archive.ExtractFile](ArchiveExtractFile.md)
- [Archive.GZipDecompress](ArchiveGZipDecompress.md)
- [IsError](IsError.md)
- [JSON.Colorize](JSONColorize.md)

### Release notes

- **Version 14.3**
    - Added Options parameter for [Archive.Content](https://www.mbsplugins.eu/ArchiveContent.shtml), [Archive.Extract](https://www.mbsplugins.eu/ArchiveExtract.shtml), [Archive.ExtractFile](https://www.mbsplugins.eu/ArchiveExtractFile.shtml), [Archive.FileList](https://www.mbsplugins.eu/ArchiveFileList.shtml) and [Archive.GZipDecompress](https://www.mbsplugins.eu/ArchiveGZipDecompress.shtml) functions.
- **Version 11.5**
    - Fixed an issue with [Archive.FileList](https://www.mbsplugins.eu/ArchiveFileList.shtml) function not picking up file names on Windows due to text encoding issue.
- **Version 10.0**
    - Fixed problem in [Archive.FileList](https://www.mbsplugins.eu/ArchiveFileList.shtml) and [Archive.Content](https://www.mbsplugins.eu/ArchiveContent.shtml) not returning error if encrypted archive could not be read.

### Blog Entries

- [MBS FileMaker Plugin, version 14.3pr7](https://www.mbsplugins.de/archive/2024-07-05/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.5pr7](https://www.mbsplugins.de/archive/2021-11-13/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Embrace JSON](https://www.mbsplugins.de/archive/2020-09-29/Embrace_JSON/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.6pr3](https://www.mbsplugins.de/archive/2019-12-17/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 4/2023, Seite 38](https://filemaker-magazin.de/neuigkeit/4233-Appetithappen-FMM_202304)

This function checks for a license.

Created 8th December 2018 , last changed 5th September 2025

  
[Archive.ExtractFile](ArchiveExtractFile.md) - [Archive.GZipDecompress](ArchiveGZipDecompress.md)

[HTML Version](ArchiveFileList.shtml)