文件属性

摘要

Describe 函数配合使用时,文件可返回“File”dataType

代码示例

File properties example (stand-alone script)

The following stand-alone script displays some Describe Object properties for a file.

import arcpy


# Create a Describe object
#
desc = arcpy.Describe("C:/data/Install.log")

# Print some Describe Object properties for the file
#
print "Data Type: " + desc.dataType
print "Path:      " + desc.path
print "Base Name: " + desc.baseName
print "Extension: " + desc.extension



7/10/2012