Text File properties

La documentación de ArcGIS 3.0 se ha archivadod y ha dejado de actualizarse. El contenido y los enlaces pueden estar obsoletos. Consulte la documentación más reciente.

Resumen

If the text file contains tabular data, the Describe function returns the Table and Dataset property groups for text files; otherwise, refer to the File property group.

For a text file, the Describe dataType property returns a value of "TextFile".

Muestra de código

Text file properties example

The following stand-alone script displays some text file properties for a text file that has tabular data:

import arcpy

# Create a Describe object from the text file.
#
desc = arcpy.Describe("C:/data/evac_table.txt")

# Print some table properties
#
print("HasOID: " + str(desc.hasOID))

print("\nField names:")
for field in desc.fields:
    print("   " + field.name)