Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Close all other open notebooks
ResourceFunction["CloseOtherNotebooks"][] closes all but the current notebook. | |
ResourceFunction["CloseOtherNotebooks"][notebooks] closes all notebooks except for those specified by notebooks. |
"Modified" | False | whether to close notebooks that have unsaved changes |
Close all but the current notebook:
In[1]:= | ![]() |
Out[2]= | ![]() |
In[3]:= | ![]() |
Out[3]= | ![]() |
Only the current notebook and the messages window remain open:
In[4]:= | ![]() |
Out[4]= | ![]() |
Provide a list of notebooks that should be kept open:
In[5]:= | ![]() |
Out[7]= | ![]() |
In[8]:= | ![]() |
Out[8]= | ![]() |
In[9]:= | ![]() |
Out[9]= | ![]() |
Use a pattern to choose which notebooks to keep open:
In[10]:= | ![]() |
Out[12]= | ![]() |
In[13]:= | ![]() |
Out[13]= | ![]() |
In[14]:= | ![]() |
Out[14]= | ![]() |
By default, notebooks that have been modified in memory will not be closed:
In[15]:= | ![]() |
Out[18]= | ![]() |
In[19]:= | ![]() |
Out[19]= | ![]() |
Using "Modified"→True will close these notebooks without saving changes:
In[20]:= | ![]() |
Out[20]= | ![]() |
In[21]:= | ![]() |
Out[21]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License