<?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: Copy AGO Notebook Files In ArcGIS Pro Notebook in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/copy-ago-notebook-files-in-arcgis-pro-notebook/m-p/1239239#M63183</link>
    <description>&lt;P&gt;This can be helpful for explaining how to search for content:&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/accessing-and-creating-content/" target="_blank"&gt;Accessing and creating content | ArcGIS API for Python.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When you say the "AGO notebook directory" do you mean all of your own notebooks? If so, we can search for notebooks by your username. Then, download them to a specified folder, using the original titles:&lt;/P&gt;&lt;P&gt;(replace username with your ArcGIS Online username):&lt;/P&gt;&lt;LI-CODE lang="c"&gt;search_notebooks = gis.content.search(query='owner:username type:notebook')

for notebook in search_notebooks:
    notebook.download(r'C:\ArcGIS', f'{notebook.title}.ipynb')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can adjust the search query as needed to get the notebooks you want. Note that this will just download each notebook as a .ipynb file, which you can then open in ArcGIS Pro.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Dec 2022 17:29:13 GMT</pubDate>
    <dc:creator>DanielMiranda2</dc:creator>
    <dc:date>2022-12-08T17:29:13Z</dc:date>
    <item>
      <title>Copy AGO Notebook Files In ArcGIS Pro Notebook</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copy-ago-notebook-files-in-arcgis-pro-notebook/m-p/1239160#M63170</link>
      <description>&lt;P&gt;Would like to know if it is possible to copy the zip files created and stored in the /arcgis/home directory of AGO Notebook to a local directiory using ArcGIS Pro Notebook. The procedures are as followed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Input 1&lt;/P&gt;
&lt;P&gt;from arcgis.gis import GIS&lt;BR /&gt;import datetime as dt&lt;BR /&gt;gis = GIS('home')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Input 2 ? (Connect and query content in the AGO notebook directory /arcgis/home and loop through to get items [])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Input 3 ? (Download items [] to folder (ie. C:\Backups)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 17:44:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copy-ago-notebook-files-in-arcgis-pro-notebook/m-p/1239160#M63170</guid>
      <dc:creator>ChristopherMask</dc:creator>
      <dc:date>2022-12-08T17:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Copy AGO Notebook Files In ArcGIS Pro Notebook</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copy-ago-notebook-files-in-arcgis-pro-notebook/m-p/1239239#M63183</link>
      <description>&lt;P&gt;This can be helpful for explaining how to search for content:&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/accessing-and-creating-content/" target="_blank"&gt;Accessing and creating content | ArcGIS API for Python.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When you say the "AGO notebook directory" do you mean all of your own notebooks? If so, we can search for notebooks by your username. Then, download them to a specified folder, using the original titles:&lt;/P&gt;&lt;P&gt;(replace username with your ArcGIS Online username):&lt;/P&gt;&lt;LI-CODE lang="c"&gt;search_notebooks = gis.content.search(query='owner:username type:notebook')

for notebook in search_notebooks:
    notebook.download(r'C:\ArcGIS', f'{notebook.title}.ipynb')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can adjust the search query as needed to get the notebooks you want. Note that this will just download each notebook as a .ipynb file, which you can then open in ArcGIS Pro.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 17:29:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copy-ago-notebook-files-in-arcgis-pro-notebook/m-p/1239239#M63183</guid>
      <dc:creator>DanielMiranda2</dc:creator>
      <dc:date>2022-12-08T17:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copy AGO Notebook Files In ArcGIS Pro Notebook</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copy-ago-notebook-files-in-arcgis-pro-notebook/m-p/1239277#M63190</link>
      <description>&lt;P&gt;Thanks for the response. The above code works, but I am attempting to get the files. (See Image)&lt;/P&gt;&lt;P&gt;The idea is to create a task to run an AGO notebook for each day, which backups the organizational feature layers. The code creates a zipfile for each feature layer and downloads to the /arcgis/home directory. (This part is completed).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second objective is to copy the zipfiles from the directory /arcgis/home to a local directory (C:\). I want to accomplish this by in ArcGIS Pro notebook, if possible.&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 18:20:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copy-ago-notebook-files-in-arcgis-pro-notebook/m-p/1239277#M63190</guid>
      <dc:creator>ChristopherMask</dc:creator>
      <dc:date>2022-12-08T18:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Copy AGO Notebook Files In ArcGIS Pro Notebook</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copy-ago-notebook-files-in-arcgis-pro-notebook/m-p/1239649#M63227</link>
      <description>&lt;P&gt;I attempted to use this python code, but getting Permission denied&amp;nbsp;&lt;/P&gt;&lt;P&gt;get_url=urllib.request.urlretrieve("&lt;A href="https://OKForestry.maps.arcgis.com/home" target="_blank"&gt;https://OKForestry.maps.arcgis.com/home&lt;/A&gt;","CopyZipFilesFromAGO.zip")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 14:54:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copy-ago-notebook-files-in-arcgis-pro-notebook/m-p/1239649#M63227</guid>
      <dc:creator>ChristopherMask</dc:creator>
      <dc:date>2022-12-09T14:54:21Z</dc:date>
    </item>
  </channel>
</rss>

