# Import modules import glob,os import arcpy # Set geoprocessing workspace and working directory path = r'C:\example' print "Setting workspace to: " + path arcpy.env.workspace = path os.chdir(path) listFiles = glob.glob('*.dbf') print listFiles # Loop through the list of text files for currentFile in listFiles: # Find the current file name and path filename = currentFile[:-4] FilePath = path + '/' + currentFile # then run your conversion stuff on the current filename
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.