Archive.AddFile
---------------

Add files to the current archive.

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

MBS( "Archive.AddFile"; List { ; BasePath; TimeStamp } ) 

**MBS**( **"Archive.AddFile";** /\* Add files to the current archive. \*/  
**$List**; /\* the list of files and folders to add to archive.e.g. "test.txt" \*/   
**$BasePath**; /\* Optional; The bath path to the folder where to look for files.e.g. "C:\\test" \*/   
**$TimeStamp**) /\* Optional; The timestamp to use in the archive for the file.  
Can be empty to use today.e.g. "" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| List | the list of files and folders to add to archive. | "test.txt" |  |
| BasePath | The bath path to the folder where to look for files. | "C:\\test" | Optional |
| TimeStamp | The timestamp to use in the archive for the file.   Can be empty to use today. | "" | Optional      Added in version **14.0**. |

### Result

Returns OK or error.

### Description

Add files to the current archive.  
Please use [Archive.Create](ArchiveCreate.md) before adding the first file and use [Archive.Close](ArchiveClose.md) after the last file to finish.  
  
The plugin does not check for duplicate file names in the archive.  
### See also

- [Archive.AddText](ArchiveAddText.md)
- [Archive.Close](ArchiveClose.md)
- [Archive.Create](ArchiveCreate.md)

### Release notes

- **Version 14.0**
    - Added new parameter for [Archive.AddContainer](https://www.mbsplugins.eu/ArchiveAddContainer.shtml), [Archive.AddFile](https://www.mbsplugins.eu/ArchiveAddFile.shtml) and [Archive.AddText](https://www.mbsplugins.eu/ArchiveAddText.shtml) to pass a timestamp to use.
- **Version 13.1**
    - Added [Archive.Create](https://www.mbsplugins.eu/ArchiveCreate.shtml), [Archive.AddContainer](https://www.mbsplugins.eu/ArchiveAddContainer.shtml), [Archive.AddFile](https://www.mbsplugins.eu/ArchiveAddFile.shtml), [Archive.AddText](https://www.mbsplugins.eu/ArchiveAddText.shtml) and [Archive.Close](https://www.mbsplugins.eu/ArchiveClose.shtml) functions.

### Example Databases

- [Archives/Archives](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Archives/Archives.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Advent calendar - Door 9 - Archives](https://www.mbsplugins.de/archive/2024-12-09/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 14.0 für Claris FileMaker](https://www.mbsplugins.de/archive/2024-01-16/Neues_MBS_Plugin_140_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 14.0 for Claris FileMaker](https://www.mbsplugins.de/archive/2024-01-16/MBS_FileMaker_Plugin_140_for_C/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 14.0pr7](https://www.mbsplugins.de/archive/2024-01-08/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 13.1](https://www.mbsplugins.de/archive/2023-03-15/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Build archives on the fly](https://www.mbsplugins.de/archive/2023-02-27/Build_archives_on_the_fly/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.1pr3](https://www.mbsplugins.de/archive/2023-02-16/MBS_FileMaker_Plugin_version_1/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 13th February 2023 , last changed 25th January 2025

  
[Archive.AddContainer](ArchiveAddContainer.md) - [Archive.AddText](ArchiveAddText.md)

[HTML Version](ArchiveAddFile.shtml)