ChangeDir

Declaration: TFtpConnection.ChangeDir (Path: string): integer;
The method ChangeDir changes the current directory on the FTP server file system to the subdirectory specified by the Path parameter.

The function returns the following error codes:

 0 ... everything is OK
-2 ... path not found
-3 ... cannot read file (access error)
-9 ... unspecified error

Hint 1: Most FTP servers are Unix-based. Thus the (Path) normally uses slashes (/) instead of backslashes (\) to separate directories. Failing to use the correct separation character will result in an error (-2).