All Questions
23 questions
0
votes
1
answer
281
views
Getting feature datasets with arcpy.da.Walk
I am using ArcGIS Pro 3.1.0.
I'm trying to find feature datasets in file geodatabase (possibly many geodatabases, but for clarity here only one) using arcpy.da.Walk. I'm aware of workaround using ...
0
votes
1
answer
138
views
Task Scheduler run arcpy.da.Walk correctly
I have a task in Task Scheduler (Windows Server 2016 Standard) that runs a simple .bat file calling python.exe and my python file. One of the first things my .py file does is use arcpy.da.Walk to ...
1
vote
0
answers
62
views
arcpy.da.Walk can not get feature class in dataset with Chinese in path (could reoccurrence bug)
2023.02.27 edit. I know how fix it now, but would like to know why so that I can change my module.
I used to use this function to iterate all feature classes, but it has a problem with path with ...
0
votes
1
answer
611
views
Looping through Excel files and deleting the same column for each
import csv
import os
import pandas as pd
#This nested for loop iterates through my excel files and then appends them to my list.
feature_classes = []
for dirpath, dirnames, datatypes in arcpy.da.Walk(...
2
votes
1
answer
427
views
Deleting feature based on attribute using arcpy.da.Walk on file geodatabase
I'm very new to scripting and am having trouble figuring out how to use da.Walk to delete features based on attributes for my entire geodatabase. I got the script below to work on an individual ...
1
vote
1
answer
420
views
Loop through directories and mosaic all raster TIFFs in each dir
I have 200+ directories, each directory contains x amount of TIFFs which I want to mosaic.
I have a snip of code that will list the TIFF contents of all dirs under a parent directory, now I just need ...
2
votes
1
answer
399
views
For loop for access to a directory files in ArcPy
I have a Python Toolbox and I want to use a directory to read different shapefiles. But when I run the script It only works for the first shape.
fd is the directory and the code is:
fd= parameters[0]....
5
votes
2
answers
3k
views
Get feature class names inside ESRI File Geodatabase
I have a project folder with many many folders within that. Some of these child folders contain an ESRI File Geodatabase(s). I want to list all the feature classes that are inside the GDBs that have ...
1
vote
1
answer
33
views
Saving outputs from arcpy.da.Walk to the same folder
I have a number of sub-directories within my "BP Tiles" directory. Each of these sub-directories represents a different year (2016, 2017, 2018, etc.) and within each of these sub-directories is a list ...
3
votes
1
answer
347
views
Describing element in geodatabase using ArcPy
With help from people on this site, I have the following code to look for all of the element types in the geodatabase and put them into a report.
walk = arcpy.da.Walk(workspace, topdown=True)
for ...
2
votes
2
answers
2k
views
Walk function in Arcpy
I posted a similar question before, but I am trying to list all of the element types in the geodatabase, such as feature datasets, networks, rasters, domains, non-spatial tables, etc.
For rasters, I ...
2
votes
1
answer
88
views
Running Python code for ArcMap?
I want to use this Python script to check my D: for .mxd's and list them in a CSV, as I want to find which MXD is using a particular file, and this would help.
I don't know where to put the file path ...
0
votes
1
answer
361
views
Arcpy iteration in folder for all shp equivalent
I want to write a scrpit that automatize the process of clip and project (in one GCS) to many .shp in folders and subfolders (row downloaded data), with 2 different GCS (CH1903+ or Lambert93).
For ...
2
votes
3
answers
2k
views
Mosaic to new raster on rasters with the same name in different locations
I have national woody vegetation raster files for Australia for years between 1988-2017. These files are separated into spatial tiles with the same name. So, what I would like to do is combine raster ...
1
vote
1
answer
3k
views
Adding Layers file to MXD using ArcPy
I tried to add several layer files to MXD file. when i run this code no error rise- but only one layer file added to the MXD and all the other 34 layer files in the workspace aren't added to the map. ...
0
votes
2
answers
2k
views
Merging all feature classes with same name nested in multiple geodatabases using ArcPy?
I am using arcpy and I want to extract a specific feature class called "building" nested in a number of geodatabase within my workspace.
Here is the code:
import arcpy
import os
workspace = "C:/...
1
vote
2
answers
215
views
Loading multiple shapefiles with different names, from +1000 subfolders
I'm looking to add a large number of point files into an .mxd from a huge group of multi-layer folders. The script from Loading multiple shapefiles from +1000 subfolders worked with some tweaks, but ...
2
votes
1
answer
1k
views
Looping main and Sub-folder in ArcPy [closed]
I am writing a Python script, which can literate through all main folder and Subfolder. My main folder names are 2001, 2002.....and under main folder differents subfolder is there, Subfolder name : ...
1
vote
1
answer
1k
views
Using arcpy.da.Walk to go through many file geodatabases
I have several file geodatabases I've downloaded from a content provider. A subset of them, which I'm filtering by a couple of strings, have 1 feature dataset within (containing many feature classes) ...
2
votes
3
answers
716
views
Optimizing arcpy.da.Walk performance?
I'm trying to automate a workflow that currently costs a co-worker about 45 minutes. General run down is this person copies files from a network drive onto a local one, and process it through four ...
1
vote
1
answer
74
views
Specific Feature Copying
I'm trying to write a script to copy multiple feature classes from two different databases into a single database, but I want to be able to specity what features I actually want. I know I need to use ...
4
votes
2
answers
1k
views
Getting arcpy.da.walk to continue walking after encountering corrupt/problem file
I am relatively new to python. I am trying to iterate through all DWG polylines in a directory with multiple (hundreds) of subdirectories. I would like the code to skip any DWG files that it cannot do ...
1
vote
1
answer
212
views
Filtering out Annotation Feature Classes using arcpy.da.Walk()?
Is there a way to use:
for dirpath, dirnames, filenames in arcpy.da.Walk():
to filter out annotation feature classes?
The help doesn't specify them as a type, which is strange because using the ...