Files to Data Python Script Tool

Discussion created by rfairhur24 on Aug 22, 2010
Latest reply on May 24, 2014 by rfairhur24
I have been finding that scanned images stored as PDFs, TIFFs or other formats are beginning to make up an increasing background resource for my Department's research efforts, but they have little integration within the GIS environment itself.

In an effort to make this data more accessible directly within GIS I have writen a tool to read a chosen folder, together with all of its subdirectories, and store the file information within it into 3 fields in a table.  The first field contains the full path and file name of each file name read, which acts as a hyperlink.  The second field contains the file name only, which I use as a labeling field or hyperlink friendly name.  The third field contains the Last Modified date of the file, which helps to determine whether updates have occurred if the data needs to be periodically refreshed from the source folder.  The user can assign names for each of these fields to their taste or accept default names provided by the tool.

The tool creates a standalone table.  ESRI standalone tables are relatively limited and I believe that substantial enhancements to Editing and other functions should be provided by ESRI.   It is possible to use these tables in a relationship to other features and data, but otherwise standalone tables limit what you can do.  If you feel like me that Standalone tables should be more fully integrated into the ESRI editing environment and tool sets, please support the idea posted here:

In order to get the most flexibility for using the output, I typically must add two additional double fields to the table and use them to create an XY Event layer.  As an XY Event Layer the records can be manipulated like a feature class.  For example, the records can be selected in different ways and the selections can be copied and pasted into other feature classes, EXCEL or other programs.  I also have developed a VBA tool that can actually attribute the XY fields with coordintates derived from a mouse click, but I am still looking at ways to establish a fast workflow for assigning spatial information.

I have not found the need to apply filters to the file types on the folders I have used this tool on, but the tool should not be hard to adapt to apply user specified filtering.  If there is a request for various filtering options, I will consider making that an enancement for a later version.

Special thanks to Chris Snyder, since this tool makes extensive use of the structure and error checking methods he developed for his Permanenetly Sort Records tool.  He also gave me real help in understanding how to program with Python.  This tool represents my first real effort to program a Python tool.  I hope you find this tool useful and that you are willling to share ideas on how to make the kind of information this tool creates more quickly and fully integrate into various GIS applications.