Checking for a Local File or Folder (LocalExists)

Use the LocalExists method to verify that a local file or folder exists. BstrName should be the full path.

Syntax

Boolean Object.LocalExists(BSTR bstrName);

Return Values

True

File or folder does exist

False

File or folder does not exist

Example

Set MySite = CreateObject("CuteFTPPro.TEConnection")

'Initialize all necessary fields for MySite : host name, user, password, etc.

L = MySite.LocalExists("c:\temp\file.txt")

If (L) Then

MsgBox "File exists on local side"

Else

MsgBox "File doesn't exist on local side"

End if