None of the answers mention writing unit testable solution. You could use System.IO.Abstractions as it provides testable wrapper around FileSystem operations, using which you can create mocked file system objects and write Unit Tests.
using System.IO.Abstractions;
IFileInfo fileInfo = _fileSystem.FileInfo.FromFileName("filePathAndName");
fileInfo.MoveTo(Path.Combine(fileInfo.DirectoryName, newName));
Tested and working code to rename a file.