Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
7 years, 4 months ago
This question already has answers here:
7 years ago.
So my problem is that I want to be able to close all of my currently open windows/notebooks from my code, but
Quit only quits the current kernel. Is there any command to do this besides
NotebookClose, which requires that I pass in the notebook to close which I won't necessarily have available?
P.S. If you need me to clarify, just say so!
Jan 17, 2016 at 16:41
85 4 4 bronze badges
Run["taskkill /F /FI \"IMAGENAME eq Mathematica.exe\" > nul"]
Jan 17, 2016 at 21:32
Chris Degnen Chris Degnen
30.5k 2 2 gold badges 52 52 silver badges 107 107 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only
NotebookClose /@ Notebooksbut if there is something to save you don't care about, use: