I'm working in ArcMap 10.3, and I have a script that searches through all the files in a directory, grabs any file containing a key word, and copies it over to new gdb based on whether it is a point, line, or polygon. The problem is that it gets held up when it encounters non-spatial files, like a .jpg, because I'm using desc.shapeType on each file. What I'd like to know is, is there a way to quickly determine if a file is spatial or not, besides adding in some statements about its file extension (i.e.if fc.endswith(".jpg"):? For instance, is there a way to check if the .shapeType method works on a file, and then to skip it if not?
أكثر...
أكثر...