<?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 loop through a folder with text files in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625125#M27784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck with how to loop through a folder containing numerous text files containing lat and long values. The idea is to open a text file, create an XY layer and then append the result into a layer within a geodatabase. I can do the following which takes a single text file, creates the xy layer and then appends this xy layer to the geodatabase layer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# XYTableToPoint.py&lt;BR /&gt;# Description: Creates a point feature class from input table&lt;/P&gt;&lt;P&gt;# import system modules &lt;BR /&gt;import arcpy&lt;/P&gt;&lt;P&gt;# Set environment settings&lt;BR /&gt;arcpy.env.workspace = r"C:\Projects\points\test.gdb"&lt;/P&gt;&lt;P&gt;# Set the local variables&lt;BR /&gt;in_table = r"D:\points\split_data\file_1.txt"&lt;BR /&gt;out_feature_class = "file1"&lt;BR /&gt;x_coords = "field7"&lt;BR /&gt;y_coords = "field6"&lt;BR /&gt;z_coords = ""&lt;/P&gt;&lt;P&gt;# Make the XY event layer...&lt;BR /&gt;arcpy.management.XYTableToPoint(in_table, out_feature_class,x_coords, y_coords, z_coords,&lt;BR /&gt; arcpy.SpatialReference(4326))&lt;/P&gt;&lt;P&gt;# Print the total rows&lt;BR /&gt;print(arcpy.GetCount_management(out_feature_class))&lt;/P&gt;&lt;P&gt;arcpy.management.Append("file1", r"C:\Projects\points\test.gdb\all_Points", "NO_TEST", 'id "id" true true false 25 Text 0 0,First,#,file1,Field1,0,8000;individualCount "individualCount" true true false 15 Text 0 0,First,#,file1,Field2,0,8000;year "year" true true false 4 Long 0 0,First,#,file1,Field3,-1,-1;month "month" true true false 2 Short 0 0,First,#,file1,Field4,-1,-1;country "country" true true false 255 Text 0 0,First,#,file1,Field5,0,8000;decimalLatitude "decimalLatitude" true true false 8 Double 0 0,First,#,file1,Field6,-1,-1;decimalLongitude "decimalLongitude" true true false 8 Double 0 0,First,#,file1,Field7,-1,-1;Name "Name" true true false 100 Text 0 0,First,#,file1,Field8,0,8000', '', '')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine but this would be tedious to do edit and rerun manually for each file (potentially over a 1000 files).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice most welcome.&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jan 2020 13:46:06 GMT</pubDate>
    <dc:creator>MarkBalman</dc:creator>
    <dc:date>2020-01-30T13:46:06Z</dc:date>
    <item>
      <title>loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625125#M27784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck with how to loop through a folder containing numerous text files containing lat and long values. The idea is to open a text file, create an XY layer and then append the result into a layer within a geodatabase. I can do the following which takes a single text file, creates the xy layer and then appends this xy layer to the geodatabase layer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# XYTableToPoint.py&lt;BR /&gt;# Description: Creates a point feature class from input table&lt;/P&gt;&lt;P&gt;# import system modules &lt;BR /&gt;import arcpy&lt;/P&gt;&lt;P&gt;# Set environment settings&lt;BR /&gt;arcpy.env.workspace = r"C:\Projects\points\test.gdb"&lt;/P&gt;&lt;P&gt;# Set the local variables&lt;BR /&gt;in_table = r"D:\points\split_data\file_1.txt"&lt;BR /&gt;out_feature_class = "file1"&lt;BR /&gt;x_coords = "field7"&lt;BR /&gt;y_coords = "field6"&lt;BR /&gt;z_coords = ""&lt;/P&gt;&lt;P&gt;# Make the XY event layer...&lt;BR /&gt;arcpy.management.XYTableToPoint(in_table, out_feature_class,x_coords, y_coords, z_coords,&lt;BR /&gt; arcpy.SpatialReference(4326))&lt;/P&gt;&lt;P&gt;# Print the total rows&lt;BR /&gt;print(arcpy.GetCount_management(out_feature_class))&lt;/P&gt;&lt;P&gt;arcpy.management.Append("file1", r"C:\Projects\points\test.gdb\all_Points", "NO_TEST", 'id "id" true true false 25 Text 0 0,First,#,file1,Field1,0,8000;individualCount "individualCount" true true false 15 Text 0 0,First,#,file1,Field2,0,8000;year "year" true true false 4 Long 0 0,First,#,file1,Field3,-1,-1;month "month" true true false 2 Short 0 0,First,#,file1,Field4,-1,-1;country "country" true true false 255 Text 0 0,First,#,file1,Field5,0,8000;decimalLatitude "decimalLatitude" true true false 8 Double 0 0,First,#,file1,Field6,-1,-1;decimalLongitude "decimalLongitude" true true false 8 Double 0 0,First,#,file1,Field7,-1,-1;Name "Name" true true false 100 Text 0 0,First,#,file1,Field8,0,8000', '', '')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine but this would be tedious to do edit and rerun manually for each file (potentially over a 1000 files).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice most welcome.&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 13:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625125#M27784</guid>
      <dc:creator>MarkBalman</dc:creator>
      <dc:date>2020-01-30T13:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625126#M27785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not Python so to speak but another option would be to use the LocateXT functionality within ArcGIS Pro;&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/help/data/locatext/extract-locations.htm" title="https://pro.arcgis.com/en/pro-app/help/data/locatext/extract-locations.htm"&gt;What is LocateXT—ArcGIS Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That may be easier to adjust. There is also more functionality coming out with the next release at ArcGIS Pro 2.5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 14:45:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625126#M27785</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2020-01-30T14:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625127#M27786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Python has several ways to find TXT files on a file system:&amp;nbsp; &lt;A class="link-titled" href="https://stackoverflow.com/questions/3964681/find-all-files-in-a-directory-with-extension-txt-in-python" title="https://stackoverflow.com/questions/3964681/find-all-files-in-a-directory-with-extension-txt-in-python"&gt;Find all files in a directory with extension .txt in Python - Stack Overflow&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 16:51:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625127#M27786</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-01-30T16:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625128#M27787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the&lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/data-access/walk.htm"&gt; arcpy.da.Walk function&lt;/A&gt; to loop through the files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 21:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625128#M27787</guid>
      <dc:creator>LorneDmitruk2</dc:creator>
      <dc:date>2020-01-30T21:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625129#M27788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os

&lt;SPAN class="comment token"&gt;# Set environment settings&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\Projects\points\test.gdb"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Set the local variables&lt;/SPAN&gt;
in_folder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; whatever your folder &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt;
merged_fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; name of final merged fc to be created &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; gdb

x_coords &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"field7"&lt;/SPAN&gt;
y_coords &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"field6"&lt;/SPAN&gt;
z_coords &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;#grab all the text files and put them in  a list&lt;/SPAN&gt;
text_file_list &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; file &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listdir&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_folder&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;".txt"&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; file&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        text_file_list&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;file&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Make the point feature classes&lt;/SPAN&gt;
path_list &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; text_file &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; text_file_list&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    in_table &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_folder&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;text_file&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strip&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;".txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    out_fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"in_memory"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    path_list&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;out_fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;management&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;XYTableToPoint&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_table&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;x_coords&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; y_coords&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; z_coords&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SpatialReference&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Merge&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;path_list&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;merged_fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"in_memory"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:38:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625129#M27788</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-12-12T02:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625130#M27789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/76303"&gt;Mark Balman&lt;/A&gt;‌, have any of the suggestions helped?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 23:15:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625130#M27789</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-02-06T23:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625131#M27790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lorne&lt;/P&gt;&lt;P&gt;Thank you for the suggestion. Am quite new to python so have yet to try this method&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 10:45:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625131#M27790</guid>
      <dc:creator>MarkBalman</dc:creator>
      <dc:date>2020-02-07T10:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625132#M27791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua&lt;/P&gt;&lt;P&gt;Thanks for the suggestions, will try these once I have more time to spend on the task &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 10:46:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625132#M27791</guid>
      <dc:creator>MarkBalman</dc:creator>
      <dc:date>2020-02-07T10:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625133#M27792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this but got error message which I am trying to work out (will be trying again next week)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 10:50:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625133#M27792</guid>
      <dc:creator>MarkBalman</dc:creator>
      <dc:date>2020-02-07T10:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625134#M27793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you George,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not tried Locate yet but will have a look when I have some spare time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 10:51:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625134#M27793</guid>
      <dc:creator>MarkBalman</dc:creator>
      <dc:date>2020-02-07T10:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625135#M27794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi George, Locate looks interesting but sadly we don't have a license for it.&lt;/P&gt;&lt;P&gt;Best wishes,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 09:24:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625135#M27794</guid>
      <dc:creator>MarkBalman</dc:creator>
      <dc:date>2020-02-13T09:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625136#M27795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I finally managed to get this working. I needed to modify the following lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;CODE&gt;out_fc &lt;SPAN class=""&gt;=&lt;/SPAN&gt; os&lt;SPAN class=""&gt;.&lt;/SPAN&gt;path&lt;SPAN class=""&gt;.&lt;/SPAN&gt;join&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"in_memory"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;name&lt;SPAN class=""&gt;) &lt;EM&gt;this doesn't work so changed to 
&lt;/EM&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;CODE&gt;out_fc &lt;SPAN class=""&gt;=&lt;/SPAN&gt; os&lt;SPAN class=""&gt;.&lt;/SPAN&gt;path&lt;SPAN class=""&gt;.&lt;/SPAN&gt;join&lt;SPAN class=""&gt;(r&lt;/SPAN&gt;&lt;SPAN class=""&gt;"memory"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;name&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;
&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class=""&gt;.&lt;/SPAN&gt;Merge&lt;SPAN class=""&gt;(&lt;/SPAN&gt;path_list&lt;SPAN class=""&gt;,&lt;/SPAN&gt;merged_fc&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/CODE&gt; &lt;CODE&gt;&lt;SPAN class=""&gt;&lt;EM&gt;this doesn't work so changed to 
&lt;/EM&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE&gt;arcpy&lt;SPAN class=""&gt;.management.&lt;/SPAN&gt;Merge&lt;SPAN class=""&gt;(&lt;/SPAN&gt;path_list&lt;SPAN class=""&gt;,&lt;/SPAN&gt;merged_fc&lt;SPAN class=""&gt;)

Many thanks for your assistance!
Best,
Mark&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/CODE&gt;
&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:38:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625136#M27795</guid>
      <dc:creator>MarkBalman</dc:creator>
      <dc:date>2021-12-12T02:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: loop through a folder with text files</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625137#M27796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just for reference, the old style of calling geoprocessing tools like Merge was:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;arcpy.Merge_management()&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and the new style is:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;arcpy.management.Merge()&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both styles have worked since the beginning, but Esri is now focusing/transitioning more to the "new" style, which is definitely more Pythonic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 15:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/loop-through-a-folder-with-text-files/m-p/625137#M27796</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-02-13T15:01:53Z</dc:date>
    </item>
  </channel>
</rss>

