Convert all files in a folder and subfolder to arcsde geodatabase

Discussion created by khaliddidi on Nov 10, 2011
Latest reply on Nov 10, 2011 by khaliddidi
Hello I have a problem with script python, I do that for converting all shape in foler and subfoler and dirs to arcsde geodatabase i wright this but , it's now working, what is the problem for this:
>>>import arcpy
>>> from arcpy import env
>>> import os, sys
>>> import os.path

>>>def fcs_in_workspace(workspace):
arcpy.env.workspace = workspace
for fc in arcpy.ListFeatureClasses():
  print os.path.join(workspace, fc)
  for ws in arcpy.ListWorkspaces():
   fcs_in_workspace(os.path.join(workspace, ws))
>>>fclist = list(fcs_in_workspace("Z:\\\\0_referentiels\\4_maillages\\1_AAMP"))

>>> for fc in fclist:
       arcpy.FeatureClassToGeodatabase_conversion(fc,"C:\\\\Documents and Settings\\xx\\Application Data\\ESRI\\Desktop10.0\\ArcCatalog\\Connection to")

Thanks for you answers