Just add:
namespace System.IO
{
public static class FileInfoExtensions
{
public static void Rename(this FileInfo fileInfo, string newName)
{
fileInfo.MoveTo(Path.Combine(fileInfo.Directory.FullName, newName));
}
}
}
And then...
FileInfo file = new FileInfo("c:\test.txt");
file.Rename("test2.txt");