Move file to different folder using FTP

Just use Rename method to move files to different folder:

// C# version

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

    client.Rename("report.txt", "reports/report_2010.txt");

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

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

	client.Rename("report.txt", "reports/report_2010.txt")

	client.Close()
End Using

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

Tags:    

Questions?

Consider using our Q&A forum for asking questions.