<?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: Move multiple notebooks at the same time (programmatically) in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/112785#M4883</link>
    <description>&lt;P&gt;How to copy the notebook from one environment to another programmatically?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/88823"&gt;@Walter_C&lt;/a&gt;&amp;nbsp; &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/128731"&gt;@Kaniz_Fatma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Mar 2025 10:16:05 GMT</pubDate>
    <dc:creator>databicky</dc:creator>
    <dc:date>2025-03-17T10:16:05Z</dc:date>
    <item>
      <title>Move multiple notebooks at the same time (programmatically)</title>
      <link>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/56990#M2188</link>
      <description>&lt;P&gt;If I want to move multiple (hundreds of) notebooks at the same time from one folder to another, what is the best way to do that? Other than going to each individual notebook and clicking "Move".&lt;/P&gt;&lt;P&gt;Is there a way to programmatically move notebooks? Like automatically move notebooks to an Archive folder based on last edit date, etc.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 19:45:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/56990#M2188</guid>
      <dc:creator>hbs59</dc:creator>
      <dc:date>2024-01-11T19:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple notebooks at the same time (programmatically)</title>
      <link>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/57249#M2208</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The best way to move multiple notebooks at the same time from one folder to another is by using the Databricks workspace API to export and then import the notebooks into the new folder. This can be done from the UI at the top of the screen near to the Share option, on the 3 vertical dots you can select export option, this will generate a file with all the notebooks and folders on the page, then you can import them in the desired folder.&lt;BR /&gt;&lt;BR /&gt;To do it programmatically you can refer to KB:&amp;nbsp;&lt;A href="https://kb.databricks.com/notebooks-internal/1333098-how-to-migrate-shared-folders-and-the-notebooks" target="_blank"&gt;https://kb.databricks.com/notebooks-internal/1333098-how-to-migrate-shared-folders-and-the-notebooks&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2024 16:08:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/57249#M2208</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-01-13T16:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple notebooks at the same time (programmatically)</title>
      <link>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/57917#M2291</link>
      <description>&lt;P&gt;Hi, thank you for your response. The link goes to HelpJuice, which I do not have access to. Do you know of an alternative resource/way to view that/etc.?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 21:46:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/57917#M2291</guid>
      <dc:creator>hbs59</dc:creator>
      <dc:date>2024-01-19T21:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple notebooks at the same time (programmatically)</title>
      <link>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/57956#M2299</link>
      <description>&lt;P&gt;You should be redirected to the KB page, but this is the information contained:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H1 id="problem"&gt;Problem&lt;/H1&gt;
&lt;P&gt;How to migrate Shared folders and the notebooks&lt;/P&gt;
&lt;H1 id="cause"&gt;Cause&lt;/H1&gt;
&lt;P&gt;Shared notebooks are not migrated into new workspace by default&lt;/P&gt;
&lt;H1 id="solution"&gt;Solution&lt;/H1&gt;
&lt;P&gt;Please find the script to migrate the Shared folder data.&lt;/P&gt;
&lt;PRE id="isPasted"&gt;import sys
import os
import subprocess
from subprocess import call, check_output


EXPORT_PROFILE = "primary"
IMPORT_PROFILE = "secondary"


# Get a list of all users
# Export sandboxed environment(folders, notebooks) for each user and import into new workspace.
#Libraries are not included with these APIs / commands.
#print("Trying to migrate workspace for user ".decode() + user)
print ("Trying to migrate workspace for Shared folders ")
export_exit_status = call("databricks workspace export_dir /Shared/" + " ./" + " --profile " + EXPORT_PROFILE, shell = True)
import_exit_status = call("databricks workspace import_dir ./Shared/ /Shared/" + " --profile " + IMPORT_PROFILE, shell=True)
print ("All done")&lt;/PRE&gt;
&lt;P class="empty-paragraph"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 17:18:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/57956#M2299</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-01-20T17:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple notebooks at the same time (programmatically)</title>
      <link>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/112784#M4882</link>
      <description>&lt;P&gt;How to do this for other environments?&lt;/P&gt;&lt;P&gt;For example&amp;nbsp; how to copy the notebooks from dev to int ?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 10:13:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/112784#M4882</guid>
      <dc:creator>databicky</dc:creator>
      <dc:date>2025-03-17T10:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple notebooks at the same time (programmatically)</title>
      <link>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/112785#M4883</link>
      <description>&lt;P&gt;How to copy the notebook from one environment to another programmatically?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/88823"&gt;@Walter_C&lt;/a&gt;&amp;nbsp; &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/128731"&gt;@Kaniz_Fatma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 10:16:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/112785#M4883</guid>
      <dc:creator>databicky</dc:creator>
      <dc:date>2025-03-17T10:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple notebooks at the same time (programmatically)</title>
      <link>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/112828#M4886</link>
      <description>&lt;P&gt;You can use the export and import API calls in order to export this notebook to your local machine and then import it to the new workspace.&lt;BR /&gt;&lt;BR /&gt;Export:&amp;nbsp;&lt;A href="https://docs.databricks.com/api/workspace/workspace/export" target="_blank"&gt;https://docs.databricks.com/api/workspace/workspace/export&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Import:&amp;nbsp;&lt;A href="https://docs.databricks.com/api/workspace/workspace/import" target="_blank"&gt;https://docs.databricks.com/api/workspace/workspace/import&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 16:55:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/112828#M4886</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2025-03-17T16:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple notebooks at the same time (programmatically)</title>
      <link>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/112837#M4887</link>
      <description>&lt;P&gt;Yes &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/88823"&gt;@Walter_C&lt;/a&gt;&amp;nbsp;, i tried this it is able to export the notebook and while doing import in the another environment it is not doing correctly, do you have any sample code for this. And one more thing they are using unity catalog, they are restricting the access to create notebook in workspace that is the reason why I am not able to do import the notebook or something else?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you pls help me with these process?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 17:54:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/move-multiple-notebooks-at-the-same-time-programmatically/m-p/112837#M4887</guid>
      <dc:creator>databicky</dc:creator>
      <dc:date>2025-03-17T17:54:05Z</dc:date>
    </item>
  </channel>
</rss>

