I have a list of SHP files that I want to rename. First, I want to replace the "." from the shp to "_", and then rename the file. As you can see in the image below:
This the code that I am using:
import arcpy, os
for filename in arcpy.ListFeatureClasses():
The problem is that when I am trying to open the SHP file it does not work. I am getting the following error message:
Does anyone knows how to fix the problem...
Thanks for your help
Your trying to hard
arcpy.env.worcspace = "Your workspace"
for file in arcpy.ListFeatureClasses():
a = "shp_" + file.replace('.','_')