I have four input feature classes and one feature dataset which I am trying to send them to. I would like the new feature classes to have the same names as the originals. My process is as follows:
for file in working_files:
arcpy.conversion.FeatureClassToFeatureClass(file,sesc_fd, r"C:\Users\delenteny\Documents\ArcGIS\Projects\Dale_Workspace\Dale_Workspace.gdb\%file%")
I receive an error when running the code as above which says
The name contains invalid characters. Failed to execute (FeatureClassToFeatureClass).
arcpy.conversion.FeatureClassToFeatureClass(file,sesc_fd, os.path.basename(file))but don't forget toimport osfirst.f, so the variable was not appliedfwouldn't matter, that wouldn't be a valid f-string anyway.