Folder management using FTP (create, delete, rename)

Use CreateFolder, Rename and DeleteFolder methods for folder management on remote FTP server:

// C# version

using (Ftp client = new Ftp())
{
    client.Connect("ftp.example.org");
    client.Login("user", "password");

    client.CreateFolder("reports");

    client.Rename("reports", "reports 2010");

    client.DeleteFolder("reports 2010");

    client.Close();
}
' VB.NET version

Using client As New Ftp()
	client.Connect("ftp.example.org")
	client.Login("user", "password")

	client.CreateFolder("reports")

	client.Rename("reports", "reports 2010")

	client.DeleteFolder("reports 2010")

	client.Close()
End Using

You can download Ftp.dll FTP/FTPS component for .NET here.

Tags: , , ,

Questions?

Consider using our Q&A forum for asking any questions.