Rename a file in C#
To rename a File in C# you can use File.Move() Method, which moves a specified file to a new location, providing the option to specify a new file name.Example
public class Program
{
public static void Main()
{
System.IO.File.Move("oldfilename", "newfilename");
}
}