<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Trying to delete multiple fields in all shapefiles in a folder issue in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439126#M34473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I frequently bring in kml/km files and convert to GEODB's in ARCVIEW. I'm trying to modify this script in a way that I can place this script in a toolbox and run it after I've converted some (say a dozen) kml's for a project. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A) I've tried making scripts and storing them in a personal toolbox (eg Randy's Tools), but little success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;B) It seems you can modify this STANDALONE script easily for GEODB'S, but what would the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;OS.WALK&lt;/SPAN&gt;&lt;SPAN&gt; function be used for?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Randy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2012 18:56:56 GMT</pubDate>
    <dc:creator>nimitz</dc:creator>
    <dc:date>2012-08-10T18:56:56Z</dc:date>
    <item>
      <title>Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439119#M34466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to modify a script where I can remove fields from all shapefiles in a specific folder.&amp;nbsp; The issue is I can only seem to do this for shapefiles I have specified in the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;gp.deletefield 'TEST.shp'&lt;/SPAN&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I don't want to specify a particular shapefile, I want this script to do this with a wildcard and all shapefiles in this folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I am very new to Python, so I tried to use the wild card &lt;/SPAN&gt;&lt;STRONG&gt;*.shp&lt;/STRONG&gt;&lt;SPAN&gt; but that didn't do anything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; So I researched and found the &lt;/SPAN&gt;&lt;STRONG&gt;glob &lt;/STRONG&gt;&lt;SPAN&gt;function.&amp;nbsp; Which I am having an issue trying to implement this into the script as &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;gp.deletefield glob.glob('*.shp', "Core; Comments")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; of course will return an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So 2 questions are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 1) How can I get this script to remove the Core and Comment fields from all shapefiles in this folder?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 2) Is there a way to make this script remove all &lt;/SPAN&gt;&lt;STRONG&gt;*.shp&lt;/STRONG&gt;&lt;SPAN&gt; files in all folders under the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;p:\\Traffic_Signals\KML\Jurisdictions&lt;/SPAN&gt;&lt;SPAN&gt; rather than putting the script in each folder that contains a &lt;/SPAN&gt;&lt;STRONG&gt;*.shp&lt;/STRONG&gt;&lt;SPAN&gt; file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Thanks, I know this is pretty basic I am assuming, but just starting out here and needing to figure this out...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
import arcgisscripting
import glob
gp = arcgisscripting.create()
gp.workspace = "p:\\Traffic_Signals\KML\Jurisdictions\TEST"
gp.toolbox = "management"

print "Removing Core and Comments from Shapefile"

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Delete fields
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.deletefield ('TEST.shp', "Core; Comments")
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 17:05:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439119#M34466</guid>
      <dc:creator>PeteJordan</dc:creator>
      <dc:date>2012-07-13T17:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439120#M34467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You want to build a python list of the shape files and iterate through it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Use the ListDatasets({wild_card}) tool to build the list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is where your '*.shp' wildcard goes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to set the workspace before using ListDataSets (I see you did that...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, your loop is like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcgisscripting
gp = arcgisscripting.create(9.3)
gp.workspace = "p:\Traffic_Signals\KML\Jurisdictions\TEST"
shapeList = gp.ListDatasets('*.shp') 
print "Removing Core and Comments from Shapefile"
for shape in shapeList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.DeleteField_management(shape, "Core; Comments")
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy
arcpy.env.workspace = "p:\Traffic_Signals\KML\Jurisdictions\TEST"
shapeList = arcpy.ListDatasets('*.shp') 
print "Removing Core and Comments from Shapefile"
for shape in shapeList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DeleteField_management(shape, ["Core", "Comments"])
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are using Arc10.x, then you can import arcpy and don't need arcgisscripting, although you can use it if you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are in arc9.x, you need arcgisscripting and cannot import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... and, if you are using arc9.3, use arcgisscripting(9.3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-&amp;gt; Note the slightly different syntax for arcgisscripting and arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for the second question...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you will have to search for the directories under your base one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The os and os.path commands will help there.&amp;nbsp; (import os)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;get a list of directory entries with os.listdir(path)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can test for directories with os.path.isdir(path)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OR, you can hardcode the subdirectories and do the arcpy.ListDataSets for each one.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:38:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439120#M34467</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2021-12-11T19:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439121#M34468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried to loop through your workspace using the ListFeatureClasses function?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy
from arcpy import env

env.workspace = "p:/Traffic_Signals/KML/Jurisdictions/TEST"
fcs = arcpy.ListFeatureClasses()

for fc in fcs:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DeleteField_management(fc, "Core; Comments")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris B.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:38:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439121#M34468</guid>
      <dc:creator>ChristopherBlinn1</dc:creator>
      <dc:date>2021-12-11T19:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439122#M34469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks the the input (yes I am using Arc 10).&amp;nbsp; The first one:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
arcpy.env.workspace = "p:\Traffic_Signals\KML\Jurisdictions\TEST"
shapeList = arcpy.ListDatasets('*.shp') 
print "Removing Core and Comments from Shapefile"
for shape in shapeList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DeleteField_management(shape, ["Core", "Comments"])&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Didn't do anything, but the second one&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env

env.workspace = "p:/Traffic_Signals/KML/Jurisdictions/TEST"
fcs = arcpy.ListFeatureClasses()

for fc in fcs:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DeleteField_management(fc, "Core; Comments")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Worked perfectly fine.&amp;nbsp; Not sure why that would be, but at least it's working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Now to try and test out the subfolders and see if the &lt;/SPAN&gt;&lt;STRONG&gt;import os&lt;/STRONG&gt;&lt;SPAN&gt; etc.&amp;nbsp; and see if I can get that to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Thanks for the suggestions...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:39:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439122#M34469</guid>
      <dc:creator>PeteJordan</dc:creator>
      <dc:date>2021-12-11T19:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439123#M34470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Pete,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;os.walk is what you seek.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This will delete fields from ALL shapefiles starting in the root of "p:/Traffic_Signals/KML/Jurisdictions/TEST"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os, arcpy

start = "p:/Traffic_Signals/KML/Jurisdictions/TEST"

for root, dirs, files in os.walk(start):
&amp;nbsp;&amp;nbsp;&amp;nbsp; for file in files:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if file.endswith(".shp"):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = os.path.abspath(os.path.join(root, file))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Processing: "+path
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DeleteField_management(path, "Core; Comments")

print "\nDone.\n"&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:39:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439123#M34470</guid>
      <dc:creator>RDHarles</dc:creator>
      <dc:date>2021-12-11T19:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439124#M34471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ahhhh thank you rdharles that worked perfectly...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 13:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439124#M34471</guid>
      <dc:creator>PeteJordan</dc:creator>
      <dc:date>2012-07-16T13:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439125#M34472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The first one:&lt;BR /&gt;&lt;BR /&gt;.... Didn't do anything, but the second one...&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; Worked perfectly fine.&amp;nbsp; Not sure why that would be...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that first example didn't work because I don't believe ListDataSets works with shapefiles, it deals with feature datasets in a Geodatabase, or in a Coverage as well as other kinds of files.&amp;nbsp; If you look at the help for this shapefiles aren't indicated as being supported.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 18:06:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439125#M34472</guid>
      <dc:creator>ChristopherThompson</dc:creator>
      <dc:date>2012-07-16T18:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439126#M34473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I frequently bring in kml/km files and convert to GEODB's in ARCVIEW. I'm trying to modify this script in a way that I can place this script in a toolbox and run it after I've converted some (say a dozen) kml's for a project. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A) I've tried making scripts and storing them in a personal toolbox (eg Randy's Tools), but little success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;B) It seems you can modify this STANDALONE script easily for GEODB'S, but what would the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;OS.WALK&lt;/SPAN&gt;&lt;SPAN&gt; function be used for?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Randy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 18:56:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439126#M34473</guid>
      <dc:creator>nimitz</dc:creator>
      <dc:date>2012-08-10T18:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439127#M34474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Originally Posted by &lt;/SPAN&gt;&lt;A href="mailto:pjordan@drcog.org"&gt;pjordan@drcog.org&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The first one:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.... Didn't do anything, but the second one...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Worked perfectly fine. Not sure why that would be...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first one probably didn't work because the workspace file path was not declared properly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 00:30:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439127#M34474</guid>
      <dc:creator>BruceBacia</dc:creator>
      <dc:date>2012-08-13T00:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delete multiple fields in all shapefiles in a folder issue</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439128#M34475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The first one probably didn't work because the workspace file path was not declared properly.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yeah, looks like that first had a double whammy going...&amp;nbsp; even if the workspace had been declared correctly, it still wouldn't have worked because ListDatasets doesn't return feature classes (or shapefiles) - only feature or raster datasets within a geodatabase and a few other things that are considered to be datasets and which typically live inside a geodatabase.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 14:31:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-delete-multiple-fields-in-all-shapefiles/m-p/439128#M34475</guid>
      <dc:creator>ChristopherThompson</dc:creator>
      <dc:date>2012-08-13T14:31:40Z</dc:date>
    </item>
  </channel>
</rss>

