# FileSetLastModified()

For the given file, set the last modification date

```
FileSetLastModified( file=any, date=date );
```

**Returns:** void

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| file | any | Yes | file path *Alias: filePath, source, path* |  |
| date | date | Yes | last modified date |  |

# Examples

```cfml
filesetlastmodified(expandPath("./testcase.txt"),#dateAdd("d", 2, now())#);
writeDump(getfileinfo(expandPath("./testcase.txt")).lastmodified);
```







# Categories

[File handling](../../categories/files.md)