RMDIR Delete a remote directory
Syntax:
RMDIR(directory)
- directory: remote directory to be deleted.
Remarks:
If the remote directory is not empty ScriptFTP will delete all files and subdirectories within that remote directory.
Return value:
RMDIR will return “OK” as soon as the remote directory has been removed successfully.
If the operation fails it will return an error code. You may retrieve the return value and execute various operations depending on this value. See Error handling
See also:
Example:
# Connect to server OPENHOST("ftp.myhost.com","myuser","mypassword") # Remove the remote directory foo RMDIR("foo") # Remove the remote directory temp in /www RMDIR("/www/temp") # Close the connection CLOSEHOST