When finish }, it turnback last value, i don't know why?
public string RenameTitles(string _titlerename) { string PathNew = null; FileInfo fi1 = new FileInfo(_titlerename); if (fi1.Exists) { _verincre++; string filen = fi1.Name.Substring(0, fi1.Name.Length - fi1.Extension.Length); PathNew = fi1.DirectoryName + filen + " ver " + _verincre.ToString() + fi1.Extension; FileInfo fi2 = new FileInfo(PathNew); if (fi2.Exists) { RenameTitles(_titlerename); } } return PathNew; }