Back to product page

RemoveDir method


Removes 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 wodFtpDLX.
RemotePathOptional. A Variant value. Full path to directory on remote server that should be removed.

Remarks

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

If remote directory contains file or subdirectories - it's possible (and most common behavior) that you will be unable to remove it. This depends on implementation of this command on server side.

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

Do not forget that RemotePath should always specify full absolute path (i.e. /home/joe/something) instead of relative path (i.e. joe/something).

Platforms

Windows