When deleting folders with a large number of files on Windows 11, using File Explorer can be a time-consuming process. This is because the system performs calculations and displays the progress update as files and folders are being deleted. As a result, deleting a folder with thousands of files and subfolders can take a long time.
If you’re trying to delete folders with many files, you can speed up the process to only a few seconds using commands. The only caveat is that you need to be comfortable using Command Prompt.
This guide will teach you the fastest method to delete large folders through Command Prompt and the instructions to add an option on the right-click context menu to automate the process.
Delete large folders fast from Command Prompt
To delete large folders on Windows 11 quickly, use these steps:
-
Open Start on Windows 11.
-
Search for Command Prompt, right-click the top result, and select the Run as administrator option.
-
Type the following command to navigate to the folder to delete and press Enter:
%USERPROFILE%\path\to\folder
In the command, update the path to the folder you have to delete.
-
Type the following command to delete the files in that folder without showing the output and press Enter:
del /f/q/s *.* > nul
In the command, the
/f
option forces the deletion of read-only files. The/q
option enables quiet mode. The/s
option executes the command for all files inside the folder you’re trying to remove. Using*.*
tells thedel
command to remove every file and> nul
disables the console output, improving the deletion performance. -
Type the following command to back up one level in the folder path and press Enter:
cd..
-
Type the following command to delete the folder and all its subfolders, and press Enter:
rmdir /q/s FOLDER-NAME
In the command, the
/q
switch enables quiet mode, the/s
option to run the command on all the folders, and “FOLDER-NAME” is the variable to specify to delete a specific folder.
Once you complete the steps, all the files and folders in the location will be deleted quickly from the computer.
Delete large folders fast from context menu
Alternatively, to delete larger folders even faster, it’s possible to create a script and modify the Registry to add a new entry in the right-click context menu to delete folders with a lot of files quickly.
To delete large folders quickly from the right-click context menu on Windows 11, use these steps:
-
Open Start.
-
Search for Notepad, right-click the top result, and choose the Run as administrator option.
-
Copy and paste the following lines into the Notepad text file:
@ECHO OFF ECHO Delete Folder: %CD%? PAUSE SET FOLDER=%CD% CD / DEL /F/Q/S "%FOLDER%" > NUL RMDIR /Q/S "%FOLDER%" EXIT
-
Click on File.
-
Select the Save As option.
-
Browse to the following path: C:\Windows
-
Save the file as quick_delete.bat, and ensure it uses the “.bat” extension.
-
Open Start.
-
Search for regedit and click the top result to open the app.
-
Browse the following path:
HKEY_CLASSES_ROOT\Directory\shell\
-
Right-click the Shell (folder) key, select New, and click on Key.
-
Name the key Fast Delete and press Enter.
-
Right-click the newly created key, select New, and click on Key.
-
Name the key command and press Enter.
-
Double-click the command key default String on the right side.
-
Change the value of the key with the following line.
cmd /c "cd %1 && quick_delete.bat"
-
Click the OK button
After you complete the steps, you can “Shift + right-click” a large folder and select the “Fast Delete” option from the legacy context menu to remove it from the system.
When using this method, the system will show a prompt to prevent accidental deletion. You can always proceed by pressing any key, using the “Ctrl + C” keyboard shortcut, or clicking the “X” button to cancel the operation.