Layer information in folders

Blog Post created by Dan_Patterson Champion on Sep 10, 2014

The attached script reads a folder and acquires information in layer files (ie *.lyr) (select the Permalink button if the script is not visible). 
The current paths are hardcoded.  This has been changed as part of the mxd_Info.tbx toolbox
for future dissemination once ArcScripts 2.0 comes on live.

A textfile is optional output which contains the project information.



Below is some sample output:


Source workspace: c:\!AV_10\Toolboxes\mxd_Information\Layers

Source Layer: c:\!AV_10\Toolboxes\mxd_Information\Layers\Agriculture.lyr
  Group Layer: Agricultural  
     layer, source: AgrCap               c:\Data_Files\CarpArea\CarpAgrCap.shp

Source Layer: c:\!AV_10\Toolboxes\mxd_Information\Layers\AOI.lyr
  Feature Layer: CarpAOI       
     layer, Source: CarpAOI              c:\Data_Files\CarpArea\CarpAOI.shp

Source Layer: c:\!AV_10\Toolboxes\mxd_Information\Layers\Municipal.lyr
  Group Layer: Municipal Data
     layer, source: Official Plan        c:\Data_Files\CarpArea\CarpOfficialPlan.shp
     layer, source: Zoning               c:\Data_Files\CarpArea\CarpZoning.shp
     layer, source: Landuse 2005         c:\Data_Files\CarpArea\CarpLanduse2005.shp


Source Layer: c:\!AV_10\Toolboxes\mxd_Information\Layers\Transportation.lyr
  Group Layer: Transportation
     layer, source: Railroad             c:\Data_Files\CarpArea\CarpRailroad.shp
     layer, source: Roads                c:\Data_Files\CarpArea\CarpRoads.shp

Output text file created: c:\!AV_10\Toolboxes\mxd_Information\Layers\LayerInfo.txt