c# to rename files in directory code example Example: c# rename file System.IO.File.Move("oldfilename", "newfilename");