Hello Simon!
A few Notes:
- First off, I think 'Task Manager' and 'Task Scheduler' are different things. It sounds like you're looking for 'Task Scheduler'.
- Secondly, unless you doing really fancy stuff with python, you don't need to download your own copy. ArcMap 10 (and 10.1) come with a copy. Since you have multiple copies of Python, the wrong one is getting used by default. This version being run is not the ArcGIS version and therefore can't find "arcpy". You should uninstall all copies of python except the one that came with ArcGIS (it should be located here: C:\Python27\ArcGIS10.1). Note that there may be a different copy of python installed here: C:\Python27.
- Third, are you copying the entire geodatabase? If so, you can just use the robocopy command (or another similar windows based command). You would do this by creating a ".bat" file instead of a ".py" file. This may be easier since it would it a simple windows command.
Let us know if you have any questions or need any help scripting. Good luck Simon!
Hello Simon,
This won't be a problem at all.
I think I'm being a bit of a jerk on technicalities, but I want to make sure I'm understanding you correctly. I don't think a geodatabase can store shapefiles. You likely mean feature classes.
I have a few more quick questions too:
- Are you copying one GDB or a much of GDBs? If the latter, are they all in the same folder?
- For the backup, do you want one backup (from the most recent time the backup was ran)? Or do you want a each backup in a folder named after the date of the backup. The latter might be a more secure method, but would take up a lot more space.
Let me know and we'll be able to figure something out!
print "Starting Backup..." import arcpy #arcpy.env.workspace = r"Database Connections\NameOfYourDataBase.sde" backupFolder=r"C:\Path\To\backupFolder" backupGDB="DataBackup.gdb" if not arcpy.Exists(backupFolder+'\\'+backupGDB): arcpy.CreateFileGDB_management(backupFolder, backupGDB) featureClasses=arcpy.ListFeatureClasses() for fc in featureClasses: print "Backuping up: "+fc if arcpy.Exists(backupFolder+'\\'+backupGDB+'\\'+fc): arcpy.Delete_management(backupFolder+'\\'+backupGDB+'\\'+fc) arcpy.FeatureClassToFeatureClass_conversion(fc, backupFolder+'\\'+backupGDB,fc) print "Backup complete!"