Files.SetCreationDate
---------------------

Sets the file creation date.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Files](component_Files.md) | [7.2](newinversion72.md) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ✅ Yes |

MBS( "Files.SetCreationDate"; Path; TimeStamp ) 

**MBS**( **"Files.SetCreationDate";** /\* Sets the file creation date. \*/  
**$Path**; /\* The native path to the file.e.g. "/Users/cs/Desktop/test.txt" \*/   
**$TimeStamp**) /\* The new creation date and time.e.g. Get(CurrentTimeStamp) \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The native path to the file. | "/Users/cs/Desktop/test.txt" |
| TimeStamp | The new creation date and time. | Get(CurrentTimeStamp) |

### Result

Returns OK or error.

### Description

Sets the file creation date.  
See also [Files.CreationDate](FilesCreationDate.md) function.  
### Examples

Set timestamp to now:

 MBS ( "Files.SetCreationDate"; "C:\\Users\\Administrator\\Desktop\\test.png"; Get(CurrentHostTimeStamp))  
### See also

- [Files.CreationDate](FilesCreationDate.md)

### Release notes

- **Version 7.2**
    - Added [Files.SetCreationDate](http://www.mbsplugins.eu/FilesSetCreationDate.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 7.2pr4](https://www.mbsplugins.de/archive/2017-04-26/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 19th April 2017 , last changed 27th December 2021

  
[Files.SetComment](FilesSetComment.md) - [Files.SetExcludedFromBackup](FilesSetExcludedFromBackup.md)

[HTML Version](FilesSetCreationDate.shtml)