DBWValidFileName

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Library Reference > File >

DBWValidFileName

Description

Checks that the assigned filename is a valid operating system file name.

Syntax

Function DBWValidFileName(FileName)

Parameters

FileName

file name to check

Return values

TRUE

if the file name is valid.

FALSE

if the file name is invalid.

Remarks

The function checks only for filenames, not complete paths. So a complete path won't be considered a valid file name.

Example

Sub main()
 fname1 = "c:\program files\dbworks\bin\dbworks.dll"
 fname2 = "dbworks.dll"
 MsgBox DBWValidFileName(fname1)
 'returns FALSE
 MsgBox DBWValidFileName(fname2)
 'returns TRUE
End Sub