Hay un tutorial aquí que te guiará por el proceso paso a paso. Si no utiliza Python, puede traducir el flujo de trabajo del tutorial a un modelo en ArcMap.
# Author: John Speargas
# Import module
import os
# Input folder containing files to be renamed
folder = “C:\\GIS\\TEST\\directory_to_be_renamed\\”
# Input lookup table
lookupTable = open(folder + “LookupTable.txt”)
# Read lookup table and close file
tableList = lookupTable.readlines()
lookupTable.close()
# Input fields corresponding to the old and new names
old = “OLD”
new = “NEW”
# Read the lines in the table and strip away unnecessary characters
newTable = []
for line in tableList:
newLine = line.strip()
newerLine = newLine.strip(“,”)
newestLine = newerLine.strip(“‘”)
almostFinalLine = newestLine.replace(‘”‘,”")
finalLine = almostFinalLine.split(“,”)
newTable.append(finalLine)
# Get position of old and new field names
header = newTable[0]
indexOld = header.index(old) – 1
indexNew = header.index(new) – 1
# Make lists corresponding the new and old values
oldList = []
newList = []
for item in newTable:
if item != newTable[0]:
valueOld = item[indexOld]
valueNew = item[indexNew]
oldList.append(valueOld)
newList.append(valueNew)
# For each file in the folder, parse the old name from (the path
# and-?) the extension
for file in os.listdir(folder):
nameAndExt = os.path.splitext(file)
oldName = nameAndExt[0]
extension = nameAndExt[1]
# Index the old name in the old list if it is present
if oldName in oldList:
indexOldName = oldList.index(oldName)
# Locate the same index in the “new” list
newName = newList[indexOldName]
# Rename the file using the path, the new name, and the extension
os.rename(folder + oldName + extension, folder + newName + extension)