Delete Large Files And Folders Instantly On Windows

Key Points

  • Large files and folders take significant time to delete using the conventional methods.
  • Use this command in the Command Prompt to delete large files in the current directory in seconds: del /f/q/s *.* > nul
  • To delete large folders, use this command instead: rmdir /q/s [FolderPath]

Deleting large files and folders is something that we have to live with while using a Windows computer. When deleting large files using File Explorer, it first scans and analyzes the total size of the items or the total number of items, and then begins to remove them, all the while reporting on its progress.

This method unnecessarily utilizes system resources on reporting which it could have spent on actually deleting the content.

Thankfully, you can now instantly delete large files and folders without wasting system resources using the Command Prompt. If using the Windows command line doesn’t work for you, you can add the option to the context menu throughout the Windows OS and delete any file or folder, regardless of its size, almost immediately from the context menu.

This post shows you the fastest methods to delete large items on a Windows computer using both the Command Prompt, as well as from the context menu.

Delete large file or folder from Command Prompt

We have already discussed how to delete files and folders using the Command Prompt. However, not all of the methods are for immediately deleting them; some still take a few seconds. The steps below will show you how to delete a large file or fall quickly using the Command Prompt.

Note: The methods given in the post delete the items permanently, after which the files and folders are unrecoverable and cannot be found in the Recycle Bin either.

  1. Press the Windows Key + R to open the Run Command box.

  2. Type in “cmd” and then press CTRL + Shift + Enter to open the Command Prompt with elevated privileges.

    Administrative rights may be required to perform an action on some files and folders.

  3. Now use the CD command to change the directory to the folder that you want to delete.

    CD /d [PathToFolder]
    Navigate to the folder to delete
    Navigate to the folder to delete
  4. Now run the following command to delete everything within that folder without showing an output:

    del /f/q/s *.* > nul
    Delete large files instantly with Command Prompt
    Delete large files instantly with Command Prompt

    The Del command means delete, the /f switch forces the command, and the /q switch is used for quiet mode, which means that no user input will be required. The /s switch is used for recursive mode, so all subfolders and their items will also be deleted from the current directory. The “*.*” is used to select everything (any file name and any file extension), and the “> nul” is used to disable the console output.

In the example above, we placed a 20 GB file in the “TestFolder,” and it took nearly 1 complete second for this command to delete the file.

If you wish to delete the entire folder, then use this command while replacing the variable with the folder path:

rmdir /q/s [PathToFolder]

Delete large folder from context menu

If you are not a fan of the command line, then you can also include the quick-delete option right in the Windows context menu. This way, all you will need to do is right-click any large file or folder and quickly delete it.

But first, you must perform the following steps to include the option in the context menu.

Note: The process involves making changes to the Windows Registry. Misconfiguration of critical values in the system’s registry could be fatal for your operating system. Therefore, we insist that you create a system restore point or a complete system image backup before proceeding forward with the process.

You can also use our top selection of disk imaging and backup software so you never lose your data or operating system again.

  1. Search for “Notepad” in the Start menu, right-click it, and then click “Run as administrator.”

    Run Notepad as an admin
    Run Notepad as an admin
  2. Paste the following text:

    @ECHO OFF
    ECHO Delete Folder: %CD%?
    PAUSE
    SET FOLDER=%CD%
    CD /
    DEL /F/Q/S "%FOLDER%" > NUL
    RMDIR /Q/S "%FOLDER%"
    EXIT
  3. Click File and then click “Save as.”

    Save As the Notepad file
    Save As the Notepad file
  4. Browse to the following path to save the file:

    C:\Windows
  5. Set the “Save as type” to “All files.”

  6. Enter a name for the file followed by “.bat“.

    Note: Remember the complete file name as it will be needed later.

  7. Click Save.

    Save the batch file
    Save the batch file
  8. Press the Windows Key + R to open the Run Command box.

  9. type in “regedit” and press Enter.

    Open the Registry Editor
    Open the Registry Editor
  10. Navigate to the following path from the left pane:

    Computer\HKEY_CLASSES_ROOT\Directory\shell\
  11. Right-click the Shell key, expand New, and click Key.

    Create a new key under Shell
    Create a new key under Shell
  12. Name the key “Fast Delete“.

  13. Right-click the “Fast Delete” key, expand New, and click Key again. This time, name the key “command“.

    Create the Command key under Fast Delete key
    Create the Command key under the Fast Delete key
  14. Double-click the “Default” string value in the command key, and then paste the following in the Value Data field while replacing the name of the batch file with the one you set in Step 6 above.

    cmd /c "cd %1 && [BatchFileName].bat"
    Configure the Default string for command key
    Configure the Default string for command key
  15. Click Ok and restart the computer.

Now, when you right-click a large folder, you will see the option “Fast Delete,” which will quickly delete the folder permanently.

Fast Delete large folders from context menu
Fast Delete large folders from the context menu

Closing words

Do not waste your time or your system resources in deleting items that are significantly large. Instead, use any of the two methods stated in this article to permanently delete large files and folders in a jiffy.

If you liked this post, Share it on:
Subhan Zafar is an established IT professional with interests in Windows and Server infrastructure testing and research, and is currently working with Itechtics as a research consultant. He has studied Electrical Engineering and is also certified by Huawei (HCNA & HCNP Routing and Switching).

Leave the first comment

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information