Sometimes users need to delete all files within selected folders in Windows 11.
For example, you might free up some drive space by erasing all junk files within the Temp folder.
To clear a folder without erasing it, youll usually need to pressCtrl+Ato select all files and then pressDelete.
However, there is a better way to empty a folder.
you’re free to create a new File Explorer context menu option for emptying folders instead.
This first registry script will add a context menu entry that erases all files within a primary folder.
However, that option wont delete subfolders in the same directory.
To do so, press theWin+Eto view Explorers window.
Right-smack the Temp folder and selectShow more options.
pick the newEmpty foldercontext menu option.
A message will then appear requesting confirmation.
Press theYbutton to confirm and erase all junk files that arent in use within the Temp folder.
TheEmpty folderoption permanently deletes all files.
So, you wont be able to restore them from the Recycle Bin.
So, well set up an additional context menu option that also deletes subfolders in a folder.
Then you’re able to use that option to fully empty a folder when needed.
However, youll need to copy a different script for step three.
Now youll see anEmpty folder and delete subdirectoriesoption on the classic context menu.
Select that option whenever you’re gonna wanna completely clear out a folder.
To do so, double-click theMUIVerbstring for theEmptyFolder2key.
That context menu option will have whatever title you enter for it there.
Empty Your Folders With Convenient Context Menu Options
AnEmpty folderoption is something File Explorer should already include.
Those new options will come in handy for clearing cache folders or other directories full of unneeded user files.