CasewareDocs

FileExists

Checks the existence of an IDEA database.

Compatibility

Available as of IDEA version 9.0

Syntax

FileExists(fileName as String, subFolder as String)

Parameters

fileName

Name of the database to be searched, with or without extension.

subFolder

fileName's subfolder.

Return Value

Returns true if database is found.

Remarks

subFolder is not optional but can be empty.

Example

Dim SimpleCommands As Object 
Dim fileName As String

Sub Main
Set SimpleCommands = SmartContext.MacroCommands.SimpleCommands
...

'Search for database fileName.
subFolder = ""
fileName = "My IDEA database.IMD"
If SimpleCommands.FileExists(fileName, subFolder) Then

'Do something with fileName.
End If

'Release object.
Set SimpleCommands = Nothing
End Sub