fsDirDelete

Deletes a directory on an FTP server.

Syntax:

fsDirDelete( client-handle, server-dir )

Parameters:

(s) client-handle: FTPS extender client handle.

(s) server-dir: FTP server directory to delete as the last name in a path.

Returns:

(i) 1 if successful.

This function removes a directory from the FTP server. Only the last directory in the directory path is removed.

 

Directory paths usually do not require a leading slash (/) and  some FTP servers may cause an error if the slash is present.

 

FsDirDelete reports an error when the last directory or any intermediate directory in the path does not exist.

 

Example:
  AddExtender('ilcfs44i.dll',0,'ilcfs64i.dll')
  host = 'test.example.com'
  port = 21
  user = 'demo'
  pswd  = 'password'
  
  ; Create a client
  client = fsClientInit(host, port, user, pswd)
  
  ; Deletes the 'morestuff' director
  fsDirDelete(Client, "test/dummy/stuff/morestuff")
  
  ; Disconnect from the server and remove client
  fsClientDelete(client)
See Also:

fsDirCreate, fsDirList