This should be enough to get you started:
var files = Directory.GetFiles(path);
foreach (var f in files)
{
var info = new FileInfo(f);
var name = info.Name.Split('.')[0];
var extension = info.Name.Split('.')[1];
int i;
if (int.TryParse(name, out i))
{
File.Move(info.FullName, string.Format(@"{0}\{1}.{2}", path, i + 5, extension));
}
}
2
solved Is it possible in c# to do math with file names that contain numbers? [closed]