# File_GetFileDateAccessed

> Returns the date when the file was last accessed.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/file-functions/file-getfiledateaccessed/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

#### Description

Returns the date when the file was last accessed

### Syntax

File_GetFileDateAccessed(sFile) As Boolean

### Parameters

#### sFile (String)

Filename

#### Return value

Result will be stored in gsValue

### Example

**VBScript**

```vb
If bStatus Then bStatue = File_GetFileDateAccessed("C:\CapaInstaller.txt")
If bStatus Then bStatus = Job_WriteLog("Custom", "gsValue: " & gsValue, bStatus, True)
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

#### Related functions

[File_GetFileDateCreated](/capainstaller/vb-scripting-library/file-functions/file-getfiledatecreated/) [File_GetFileDateChanged](/capainstaller/vb-scripting-library/file-functions/file-getfiledatechanged/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
