Hi all
In my python code scripting, some time I used some function to do analysis on shapefile. Those function need to specify the .shp in the filename like arcpy.Rename_management(output+'.shp', filename). When I used files in geodatabase, my script crashed.
I am wondering how I can handle this problem?
I want just specify that my script loop over lot of files.
Thanks in advance
It is hard to tell from your description what your problem is? If you would attach some sample code where you are having the problem; someone would be able to assist you better.
Here is a peace of my code:
Hi Said,
If you want to use the script for both Shapefiles and Geodatabases, you will need to check the input dataset for which data type it is. As at the moment you are appending ".shp" to the name which is invalid for the Geodatabases.
You can access which data type is input via the Describe function as seen here http://resources.arcgis.com/en/help/main/10.2/index.html#//018v0000002v000000
Hope that helps,
Owain
Your link is doubled up. I think you meant to go to ArcGIS Help 10.2 - Workspace properties (arcpy)
Sorry. I did not find the editor title bar (or advanced editor link)
Thanks for posting your code, but a screenshot is not very helpful if someone wants to copy it. Please post again as text with Python syntax highlighting.
this what I have
There should be a "Use advanced editor" link in the upper right corner of the reply box. What browser are you using?
I use IE