5

On the command line on Windows 8.1, how can I kill/close all Windows file explorer windows... but without killing and restarting the shell?

It's crazy that they're the same process.

2

You can use the command line utility NirCmd (freeware) (archive.org's mirror for the webpage; archive.org's mirror for the binary) and execute:

nircmd.exe win close class "CabinetWClass"

I use it on Windows 7 SP1 x64 Ultimate and it works as intended: it will close all Windows Explorer windows, but won't kill the explorer.exe process.

The program is supposed to work on Windows 9x/ME, Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, Windows 8, and Windows 10.

|improve this answer|||||
  • 1
    Thanks! Sorry it took so long to mark "answered". I'd totally forgotten I'd posted this question over a year ago, and just searched for a solution on Google again now only to find my own question here! nircmd rocks. – LaVache May 28 '19 at 2:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.