AnsweredAssumed Answered

Python Script to Automate a FC to FC/FGDB opertation ArcGIS Pro

Question asked by vrenforth on Dec 10, 2018
Latest reply on Jan 4, 2019 by jskinner-esristaff

I am trying to create a script that will automate a Feature Class to Feature Class OR Feature Class to File Geodatabase Conversion. I want to save this in a folder as a back up once a week in case I lose my current data for any reason or need to revert to that download date. So far I have the following code just for the FC to FC operation, and am recieving the error that follows.:

import arcpy
arcpy.env.workspace = ""
arcpy.FeatureClassToFeatureClass_conversion("Target Address New",
"C:\\Users\vmrenfor\Consumers Folders\VSR\BackupExports\VSR Back up\VSR Back up.gdb",

Traceback (most recent call last):
File "<string>", line 5, in <module>
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\", line 860, in FeatureClassToFeatureClass
raise e
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\", line 857, in FeatureClassToFeatureClass
retval = convertArcObjectToPythonObject(gp.FeatureClassToFeatureClass_conversion(*gp_fixargs((in_features, out_path, out_name, where_clause, field_mapping, config_keyword), True)))
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\", line 496, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Output Location: Dataset C:\Users mrenfor\Consumers Folders\VSR\BackupExports\VSR Back up\VSR Back up.gdb does not exist or is not supported
Failed to execute (FeatureClassToFeatureClass).

Any thoughts on how I can fix this error would be appreciated. I would then like this to be run each subsequent week, naming the file "Target_Address_{Current Date}.