Created
October 5, 2015 13:38
-
-
Save tjmichael81/e4af9884e705c45ffc15 to your computer and use it in GitHub Desktop.
Create a text file with paths to all GIS data in a given workspace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy | |
import os | |
workspace = r"<Path to workspace>" | |
outFile = r"C:\TEMP\dataPaths.txt" | |
dataPaths = open(outFile, "a") | |
for dirpath, dirnames, filenames in arcpy.da.Walk(workspace, | |
datatype="Any", | |
type="ALL"): | |
for filename in filenames: | |
dataPaths.write(os.path.join(dirpath, filename) + "\n") | |
dataPaths.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment