I have a task of changing the names of some files (that is, adding id to each name dynamically) in a folder using C#.
Example: help.txt to 1help.txt
How can
You can use File.Move, like this:
string oldFilePath = Path.Combine( Server.MapPath("~/uploads"), "oldFileName"); string newFilePath = Path.Combine( Server.MapPath("~/uploads"), "newFileName"); File.Move(oldFilePath, newFilePath);