File properties

This ArcGIS 3.0 documentation has been archived and is no longer updated. Content and links may be outdated. See the latest documentation.

Summary

When used with the Describe function, a file returns a Describe dataType property value of "File".

Code sample

File properties example

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)

In this topic