Gold Gold - 2 months ago 23
C# Question

Rename a file in C#

How do I rename a file using C#?

Answer

Take a look at System.IO.File.Move, "move" the file to a new name.

System.IO.File.Move("oldfilename", "newfilename");