Back to product page

RemoveDir method


Removes a directory from the server.

Type

None

Syntax

  • Basic
object.RemoveDir [RemotePath]
The RemoveDir(object,RemotePath) syntax has these parts:
objectAn expression evaluating to an object of type wodSFTP.
RemotePathOptional. A Variant value. Full path to a directory on the server.

Remarks

This method will remove a directory on remote server, if possible. Once completed, the Done event will be fired. If no error occurs, the ErrorCode argument in the Done event will be set to 0 (zero). If an error occurs, ErrorCode will hold the number of the error and ErrorText will contain a description for the error.

If the remote directory contains a file or subdirectories it is possible (and the usual behavior) that you will be unable to remove it. This depends on the implementation of this command on server side.

No wildcards can be used for RemotePath argument. The RFC protocol specification for SFTP does not allow them.

Platforms

Windows