Open Start on Windows 10.
Search for Command Prompt, right-click the result, and select the Run as administrator option.
Type the following command to navigate to the folder that you want to delete and press Enter:
In the command, make sure to update path with the path to the folder that you want to delete.
Type the following command to delete all the files in that folder without showing the output and press Enter:
del /f/q/s *.* > nul
The above command, we use the /f switch to force the deletion of read-only files. The /q switch enables quiet mode. The /s switch executes the command for all files in any folder inside the folder you’re trying to remove. Using *.* tells the del command to delete every file, and > nul disables the console output improving performance and speed.
Type the following command to go back one level in the folder path and press Enter:
Type the following command to delete the folder and all its subfolders and press Enter:
rmdir /q/s your-folder-name
The above command, we use the /q switch to enable quiet mode, the /s switch to run the command on all the folders, and your-folder-name is the variable you need to specify to delete the folder you want.Del and rmdir commands.
Once you complete the steps, all the files and folders in the location will delete quickly from your device.
How to delete large folder fast adding context menu option
If the command lines aren’t your thing, you don’t usually delete tons of files, or you’re just looking for a faster way, it’s possible to add a right-click context menu option that will run batch file for the data you want to delete.
Use these steps to add a context menu option that will delete files and folder extremely fast:
- Open Notepad.
- 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.
- Save the file as quick_delete.bat, but make absolutely sure it uses the .bat extension. (If you save it with an .txt extension, this will not work.)
- Move the quick_delete.bat file to the
C:\Windowsfolder. (This step is necessary, because the file need to be on a location that has a path environment variable, but you can always create your own if you’re up to the challenge.)Windows folder
- Open Start.
- Search for regedit and click the top result to open the app.
- Browse the following path:HKEY_CLASSES_ROOT\Directory\shell\Quick tip: You can copy and paste the path in the address bar of the Registry to quickly navigate to the path.
- Right-click the Shell (folder) key, and select New and click Key.Shell Registry key
- Name the key Quick Delete and press Enter.
- Right-click the newly created key, select New and click 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 and click the OK button.cmd /c “cd %1 && quick_delete.bat”Command to delete folders and files fast
Once you’ve completed the steps, you can right-click a folder and select the Quick Delete option to remove a large folder super fast.
While executing command you’ll get a security prompt which will prevent you from deleting files by accident. You can then press any key to proceed, or use the Ctrl + C keyboard shortcut or click the X button to cancel the operation.
Update September 26, 2019: This guide was originally published in August 2017, and it’s been revised for the latest version of Windows 10.