<?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: Creating folders help (python beginner) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155090#M11980</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Use a &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000039000000"&gt;Search Cursor &lt;/A&gt;to loop through the grid cells (I assume your grid is a grid of polygons...?) to get the cell's value. Then, inside the loop, incorporate the cell value into a path string, then use that string inside os.mkdir().&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;yes it is a polygon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Feb 2012 17:54:11 GMT</pubDate>
    <dc:creator>chukwuemekaobilor</dc:creator>
    <dc:date>2012-02-23T17:54:11Z</dc:date>
    <item>
      <title>Creating folders help (python beginner)</title>
      <link>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155084#M11974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to create folders and each folder will have a name from a field in my grid layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My grid has 500 tiles and I need to create 500 folders.&amp;nbsp; The naming convention is like 001A1, 001A2, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;001A3, 001B1, 001B2, 001B3, 001C1, 001C2, 001C3, 002A1...................&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code starts like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import sys, string, os, arcgisscripting, traceback&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = "C:\Backup Files\Backup Files\GISPROJECTS\Python_Practice"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set local variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output_folder_path= "C:\Backup Files\Backup Files\GISPROJECTS\Python_Practice"out_name = "folder1"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output_folder_name = foldername&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Execute CreateFolder&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 15:18:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155084#M11974</guid>
      <dc:creator>chukwuemekaobilor</dc:creator>
      <dc:date>2012-02-23T15:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folders help (python beginner)</title>
      <link>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155085#M11975</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;import os
os.mkdir("H:/newfolder") # makes folder "newfolder" on H:&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:15:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155085#M11975</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T08:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folders help (python beginner)</title>
      <link>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155086#M11976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks, How can i have it create 500 folders with different names&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 15:32:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155086#M11976</guid>
      <dc:creator>chukwuemekaobilor</dc:creator>
      <dc:date>2012-02-23T15:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folders help (python beginner)</title>
      <link>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155087#M11977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use a &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000039000000"&gt;Search Cursor &lt;/A&gt;&lt;SPAN&gt;to loop through the grid cells (I assume your grid is a grid of polygons...?) to get the cell's value. Then, inside the loop, incorporate the cell value into a path string, then use that string inside os.mkdir().&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 16:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155087#M11977</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2012-02-23T16:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folders help (python beginner)</title>
      <link>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155088#M11978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;this line will fail&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = "C:\Backup Files\Backup Files\GISPROJECTS\Python_Practice"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; either use double backslashes, a single foreslash or append an r to the beginning of the path&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 17:09:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155088#M11978</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2012-02-23T17:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folders help (python beginner)</title>
      <link>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155089#M11979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks all.&amp;nbsp; I will start trying it out and see how it work.&amp;nbsp; definetly this is new to me but I will surely get it right.&amp;nbsp; thanks again&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 17:53:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155089#M11979</guid>
      <dc:creator>chukwuemekaobilor</dc:creator>
      <dc:date>2012-02-23T17:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folders help (python beginner)</title>
      <link>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155090#M11980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Use a &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000039000000"&gt;Search Cursor &lt;/A&gt;to loop through the grid cells (I assume your grid is a grid of polygons...?) to get the cell's value. Then, inside the loop, incorporate the cell value into a path string, then use that string inside os.mkdir().&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;yes it is a polygon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 17:54:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-folders-help-python-beginner/m-p/155090#M11980</guid>
      <dc:creator>chukwuemekaobilor</dc:creator>
      <dc:date>2012-02-23T17:54:11Z</dc:date>
    </item>
  </channel>
</rss>

