19

My workflow includes many open windows. Sometimes I want to clean up and close around 10 of them (but not all). How can I achieve this fast and simple on Windows?

Edit: "but not all" to me means "selectively", not grouped by program or name, and not always the same. During research phase, I usually have opened some diff tools, some console windows, some svn logs, some explorer windows and some plain text editors. I permanently have and keep opened a mail program, an IDE, the spreadsheet where I record my time spent and a browser. Opening huge projects in the IDE takes time, so I don't want to a killall or log-off-log-on procedure.

10
  • 1
    I was going to say "Use a virtual desktop manager", but realized none of them that are able to close several windows at once are supported on windows 10. Apr 25, 2017 at 15:34
  • 1
    If you always maximize your windows instead of having hundreds of windowed windows, then the close button is always in the same location. Alt+F4 is the old standby for closing a window on Windows. If you don't care about saving anything and always close the same set of windows, the absolute fastest way is to use OpenProcess()/KillProcess() in a command-line program/script. If you are closing windows to access the desktop, there are two faster ways: The little-known Desktop Toolbar you can enable from the taskbar (should be enabled by default, IMO) and Win+M / Win+Shift+M. Apr 26, 2017 at 3:35
  • 2
    ^w very much depends on the applications. Many act in that fashion, especially software using MDI, but I would say caveat emptor – Alt+F4 is the platfrom standard "close program" shortcut and in my experience more reliable. (Although ^w is much more comfortable to type on QWERTlike keyboards.)
    – Cornelius
    Apr 26, 2017 at 9:43
  • 1
    @Roy Ctrl-W sometimes works as Alt-F4, sometimes as Ctrl-F4 depending on the software (mind you, so does Alt-F4)
    – Chris H
    Apr 26, 2017 at 13:33
  • 1
    Step 1: Be fast. Step 2: Click on the red X for the apps you want to close?
    – airstrike
    Apr 27, 2017 at 12:57

15 Answers 15

42

The fastest native solution seems to be Win + Tab and then middle-click the Apps to close them.

The best 3rd party solution I found is 7+ Taskbar Tweaker. You can configure it to close Tasks by middle-click to the tasks entry immediately in the task bar. Unfortunately, Taskbar Tweaker seems to be tailor-fit very closely to Windows and broke with every major update (Anniversary, Creator). The maintainer each time fixed it within some weeks, but meanwhile everything defaults to the old behavior of opening new instances instead of closing old ones.

5
  • 2
    Interesting. I always use Alt+Tab and the X. Win+Tab is a bit quicker since you do not have to hit exactly the small spot. Thanks for this.
    – Michael S.
    Apr 25, 2017 at 14:43
  • 7
    You can also middle-click the app in the Alt+Tab view (though I'm not sure if it closes all windows of a given app).
    – Cornelius
    Apr 25, 2017 at 16:59
  • 2
    7+ Taskbar Tweaker is great. And I've just realised why it's called that lol Apr 25, 2017 at 20:32
  • 2
    Middle click on the taskbar is by default a command to open a new window of the target app, even if it's already running coz some apps have an ability to show multiple windows. Apr 25, 2017 at 22:41
  • 2
    If you hover over the Taskbar icons and show the thumbnails of the windows, you can middle click on the thumbnails to close that instance.
    – Chloe
    Apr 27, 2017 at 0:24
9

In my case, I simply open the task manager, then in the tab Application, I select the Apps to close, then I click the End task button.

6
  • 3
    this is more drastic than closing and you may miss a chance to save your work or settings. Apr 26, 2017 at 1:20
  • 7
    OP was asking for fast and simple, and this is it
    – Denny
    Apr 26, 2017 at 7:43
  • 2
    @KateGregory I've just tested, and notepad gives a "save/don't save" prompt. On top of that Is "[End Program - Untitled- Notepad] The system cannot end this program because it is waiting for a reponse from you...[End Now][Cancel]". So it's not too much of a worry. (win7 btw)
    – Chris H
    Apr 26, 2017 at 13:36
  • 2
    @ChrisH some apps will do that, and some won't. Apr 26, 2017 at 14:03
  • @KateGregory most do but I'm wary enough to hit save then close in most things. Task manager appears to try to close gently at first so very similar to the application's own close function. This would be good for me having lots of calculator /picture viewer/Firefox/pdf viewer Windows open
    – Chris H
    Apr 26, 2017 at 14:11
7

If they are windows of the same app, you can also right-click the entry in the task bar and select "close all windows".

5

Simplest, all keyboard-bound: Alt+Tab , hit Del to close highlighted window.

Tested on Win 10. Played around and found this solution.

1
  • Win+Tab also works the same.Hitting Del is probably the fastest way to do it! Should be listed as the featured answer. May 31, 2020 at 1:17
4

If it is a known group of applications that you want to close each time you could use something like AutoHotKey to create a shortcut that closes just those windows.

Use the Window Spy (included with AHK) to most easily get the details you'd need about the windows and then use IfWinExist and WinClose commands.

3

Alt + F4 will close whatever window is in focus (and shut down windows if nothing is selected). You could combine this with Alt + Tab or Win + Tab to try to get to the desired windows quickly.

1
  • You are some how repeating another answer
    – yass
    Apr 25, 2017 at 18:45
2

If they're the same processes each time (E.G. Notepad, Photoshop, and Chrome), you could write a simple batch script to close all of them at once. Then you would just need to run the script whenever you want to close them.

For example:

killmystuff.bat

taskkill /IM notepad.exe
taskkill /IM photoshop.exe
taskkill /IM chrome.exe

Note that this will not force close them - To do so, specify the /F flag. It will also kill all processes with that image name, so can't be used to close a specific group of Chrome tabs or similar.

You can also use filters to select groups of programs by username, window title, memory usage, etc - See taskkill /? for more details.

1

I find that the fastest way to natively achieve this is like this:

  1. Click on the desired program in your task bar
  2. alt + F4

This is quicker because you close precisely the programs you wish to close where as alt + tab-ing through your programs forces you to step over unwanted programs causing you to endure more time.

1

If you don't have a long login time (i.e. lots of startup-specific programs), then logging out is a reasonable way to do it. Assuming you don't have anything to save, that Chrome keeps your tabs, etc.

1
  • 2
    I think the "(but not all") in the question means this doesn't help.
    – Chris H
    Apr 26, 2017 at 13:37
1

If you hover over the app in the taskbar, a preview will appear just above it that includes an X. You can move your mouse a very small distance to that X, and click it. You don't have to switch back and forth between mouse and keyboard.

1

The problem with just holding Alt + F4 is that it it sometimes will bring up the log off / shutdown / sleep menu.

I like to hold Alt + Esc to get all my windows in focus (by cycling through them) and then holding Alt+F4

0

In case the windows you mention are part of the same application (like a lot of separate files, opened by one single text editor), you might use Ctrl + F4

0

you can use:

1.Taskmanager to close windows.(The taskbar shows the currently running tasks)

i.Rightclick on taskbar

ii.click on start task manager

iii.In windowsTaskbar window,in applications tab you can see the applications which are all opened.select the necessary applications to be closed using ctrl key

iv.click on endtask button.

2.You can also "alt+f4"..Actually it closes the current running window

0

I've done something similar with auto-hotkey. Off the top of my head, I can't remember exactly what it was, but it was something with an F9 toggle like:

F9::Toggle
Loop, 100
{
    IfWinNotActive [, MadeUpWindowThatDoesn'tExist/Can'tBeFound]
    Gosub, sub1

    sub1:
    IfWinActive [, WindowYouWouldWantToKeepOpen]
    Gosub, sub2
    Else
    Gosub, sub3

    sub2:
    SendInput !{Tab}

    sub3:
    SendInput ^w
}
return

Now again, off the top of my head, it's likely a little different than this. If you copy and paste this bit of AHK, it likely won't work and you'll have to tweak it, but this is the core idea of what could work.

0

Because I have a multiple monitor setup at work, I found it sad that the Windows task-bar (by default) was* limited to one screen. I didn't like the various options to change this situation, so I made a tool of my own: SideSwitch. Warning: it's very tuned to my own way of working and may behave intrusive to your way of working if you're not used to it! When the mouse-cursor is at the edge of a screen - the center two quarters, not the corners - a list of windows is shown that are on that screen. Also "x" and "_" is shown to respectively close or minimize that window. (The main reason for the application was also to have the "Switch" button to painlessly move maximized windows between monitors, but since Windows 7 that's possible by dragging the maximised window's caption bar.)

*: recent Windows versions have more options

2
  • 1
    FYI On Windows 10 the task bar displays on whatever monitor the mouse pointer is on.
    – chue x
    Apr 26, 2017 at 15:48
  • @chuex depends on the settings. You can make it visible on all monitors at any time(and stay visible) !
    – Felix D.
    Apr 26, 2017 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .