Hi Russ,
I am not a programmer so maybe I am entering in something wrong here is my code... am i missing anything? I do really appreciate your help on all of this. Thanks!
>>> #!/usr/bin/python
# Import sys, getopt, arceditor, arcpy modules
import sys, getopt, arceditor, arcpy
def main(argv):
input_gdb = 'C:\Users\Kyle\Documents\Bioko Island\GIS1\GIS1'
output_gdb = 'C:\Users\Kyle\Documents\Bioko Island\APP Data.gdb'
try:
opts, args = getopt.getopt(argv,"hi:o:",["ifile= C:\Users\Kyle\Documents\Bioko Island\GIS1\GIS1","ofile= C:\Users\Kyle\Documents\Bioko Island\APP Data.gdb"])
except getopt.GetoptError:
print 'test.py -i <input_gdb> -o <input_gdb>'
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
print 'test.py -i <input_gdb> -o <output_gdb>'
sys.exit()
elif opt in ("-i", "--ifile"):
input_gdb = arg
elif opt in ("-o", "--ofile"):
output_gdb = arg
print 'Input gdb is: "', input_gdb
print 'Output gdb is: "', output_gdb
Temp_xml = "temp.xml"
# Delete the xml workspace document if it exists.
arcpy.Delete_management(Temp_xml)
# Export XML Workspace Document
arcpy.ExportXMLWorkspaceDocument_management(input_gdb, Temp_xml, "DATA", "BINARY", "METADATA")
# Import XML Workspace Document. This assumes that the outputfile geodatabase is EMPTY.
arcpy.ImportXMLWorkspaceDocument_management(output_gdb, Temp_xml, "DATA", "")
# Delete the xml workspace document if it exists.
arcpy.Delete_management(Temp_xml)
if __name__ == "__main__":
main(sys.argv[1:])
SyntaxError: multiple statements found while compiling a single statement
>>>