My goal is to rename shapefiles in 2 folders via transliteration using arcpy. That means that I want to replace Cyrillic (Russian) symbols with Latin ones. Here is my code, that doesn't work. What's wrong with it?
import arcpy InWork = ["C:\\Users\Vadim\Downloads\GML\esri", "C:\\Users\Vadim\Downloads\GML\stp"] for ws in InWork: arcpy.env.workspace = ws datasets = arcpy.ListFeatureClasses() for fc in datasets: newName = fc.replace(u"абвгдеёзийклмнопрстуфхъыьэАБВГДЕЁЗИЙКЛМНОПРСТУФХЪЫЬЭ",u"abvgdeezijklmnoprstufh'y'eABVGDEEZIJKLMNOPRSTUFH'Y'E") arcpy.Rename_management(fc, newName[:-4])