public void RenameFile(string oldfilename, string newfilename) // #######################################
{
Connect();
SendCommand("RNFR " + oldfilename);
ReadResponse();
if (response != 350)
{
#if (FTP_DEBUG)
Console.Write("\r" + responseStr);
#endif
throw new Exception(responseStr);
}
else
{
SendCommand("RNTO " + newfilename);
ReadResponse();
if (response != 250)
{
#if (FTP_DEBUG)
Console.Write("\r" + responseStr);
#endif
throw new Exception(responseStr);
}
}
}
/// <summary>