How do I rename a file using C#?

2Best Answer
21

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

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

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *