public static string UndoCreateNewFileName(string savedName, string backupPortion)
{
string oldName = savedName;
int index = savedName.LastIndexOf(backupPortion);
if (index != -1)
{
oldName = savedName.Substring(0, index);
oldName += savedName.Substring(index + backupPortion.Length);
}
return oldName;
}