We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

FtpClient should be properly initialized

When i try to Delete directory/folder from ftp I got error “FtpClient should be properly initialized.”.

I used following code .

Aspose.Network.Ftp.FtpClient T20 = new Aspose.Network.Ftp.FtpClient(host,user,password);
T20.RemoveDirectory(item.remotePath + “\old folder”);

Or

Aspose.Network.Ftp.FtpClient T20 = new Aspose.Network.Ftp.FtpClient(host,user,password);
T20.RemoveDirectory(item.remotePath );


my directory contains file as well Directory.

Please help me how to Delete the directory from remote server.




Hi,

You need to connect and login to the ftp server after creating the FtpClient object. And for deleting a folder, first its parent folder should be selected.

Please refer to the sample code snippet at <A title=blocked::.