An NDoc Documented Class Library |

# FTPConnection.Exists Method

Checks for the existence of a file on the server.

public virtual bool Exists(
string remoteFile
);

#### Parameters

remoteFile
  Path of remote file.

#### Return Value

`true` if the named file exists on the server.

#### Remarks

Not all servers support absolute paths, so it's safer to use relative paths. The path separator should be '/'. If problems are encountered the safest option is to change into the desired directory prior to calling this method and then supplying the name of the file without its path.

The existence of local files may be checked using the Exists method.

#### See Also

FTPConnection Class | EnterpriseDT.Net.Ftp Namespace