# File_FindFile

> Find the paths containing the specified file.

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

### Description

Find the paths containing the specified file

### Syntax

File_FindFile(sFileName, sStartDirectory, bIncludeSubDirectories) As Boolean

### Parameter

#### sFileName (String)

Filename

#### sStartDirectory (String)

Directory to start search within

#### bIncludeSubDirectories (Boolean)

Set to TRUE if sub folders should be included in the search

### Return value

Result will be stored in gaValue

### Example

**VBScript**

```vb
If bStatus Then bStatus = File_FindFile("CapaInstaller.txt", "C:\", True)
If bStatus Then 
  For index = LBound(gaValue) to UBound(gaValue)
    bStatus = Job_WriteLog("Custom", "The file was found in folder: " & gaValue(index), bStatus, True)
  Next
End If
```

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

### Related functions

[File_CreateEmptyFile](/capainstaller/vb-scripting-library/file-functions/file-createemptyfile/) [File_CreateDirectory](/capainstaller/vb-scripting-library/file-functions/file-createdirectory/) [File_DelTree](/capainstaller/vb-scripting-library/file-functions/file-deltree/) [File_DelFile](/capainstaller/vb-scripting-library/file-functions/file-delfile/) [File_ExistDir](/capainstaller/vb-scripting-library/file-functions/file-existdir/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
