Bulk Save as Central

it does not work fo me, it says something like the file path does not exist, but there is already a file in there
image

I guess because script is editing the file path name, splitting string by “_” and something more, and my file name contains that symbol.

ilename = filepath.Split("\\")[-1].Replace(".rvt","")
			newdoc = app.OpenDocumentFile(filepath)			
			if RVer not in filename:
				if "Central" in filename:
					x = filepath.split("_")
					x.insert(len(filepath.split("_"))-1,RVer)
					y = "_".join(x)
				else:
					x = filepath[:-4]
					y = x + "_" + RVer + ".rvt"
			else:
				y = filepath
			newdoc.SaveAs(y,SaveOptions)