In Windows 7 is there a way to select a file and delete all but that file in a folder? Or is there an app for that behavior already in existence? Maybe a right click menu?
3 Answers
Select the file you want to keep and then select Edit > Invert Selection. Then either hit Del or Shift+Del to delete them, or right click over the selected items.
-
Didn't know that existed :-) combined with shortcuts its just: ALT,E,I,DEL Jan 19, 2010 at 21:56
-
-
@EricJLN While a little clumsy, you can do keyboard-only by pressing CTRL+A to select all, then using the keys to navigate to the file you want to keep, and pressing CTRL+SPACE.– Elle HJan 20, 2010 at 0:13
Press CTRL+A to choose all items, then hold CTRL and left-click to deselect individual files.
-
-
I knew that, I was hoping for a 1 click solution, or 1 keyboard shortcut, every second on the computer helps. This is actually how I do it now. Jan 19, 2010 at 21:50
-
2This is the best answer. Would you really want a "delete all but this" entry in the context menu? How often are you really performing this action? Jan 19, 2010 at 21:56
For a mouse-free solution, with file selected (arrow keys?), Ctrl-A, Ctrl+Space.
You could script this with Autohotkey:
#SingleInstance Force
!d::
send ^a
send ^{Space}
send {Delete}
return
Select file, Alt+D.
To select a file in a folder, you can type the filename whilst the folder has focus. Windows will select the file that matches what you have typed up to that point. Then Ctrl+A, Ctrl+Space, Delete. (Or use above script)
-
I like it. Granted, it will only work where one has made the script. Jan 19, 2010 at 23:25
-
Ty. "Ctrl+A, Ctrl+Space, Delete" is generic. Script just combines that to one key combination Jan 20, 2010 at 0:10