Hi all,
I want to create a bat file that can close all open folders in the file explorer. However, it should not close any programs that are open (for example: excel, outlook, web browsers etc). Any help would be appreciated!
Thanks!
close all open folders in file explorer
Moderator: DosItHelp
Re: close all open folders in file explorer
What have you tried yourself? And where did that go wrong?
If you have Launch folder windows in a separate process enabled:
If you have that setting disbaled:
The second command could also be used in the first case, but then does a lot of unneeded work.
(both commands are untested)
If you have Launch folder windows in a separate process enabled:
Code: Select all
taskkill.exe /im explorer.exe
If you have that setting disbaled:
Code: Select all
taskkill.exe /im explorer.exe /F & explorer.exe
(both commands are untested)