Delete Folder in Windows 10  

    Delete Folder in Windows 10

    Delete Folder in Windows 10

    How to Delete a Folder in Windows 10
    Published by Category: General Tips
    07 Apr 2021
    Designer Media Ltd

    How to Delete a Folder in Windows 10


    This tutorial will show you different ways on how to delete a folder in Windows 10.

    Deleting a folder will also delete all contents inside the folder.

    Deleting a folder from a removable drive will be permanently deleted by default.

    Deleting a folder from an internal drive will be deleted to the Recycle Bin by default, and permanently deleted when you empty the Recycle Bin.



    Contents







    OPTION ONE

    Delete Folder using Keyboard Shortcut


    1 While on your desktop (Win+D) or in File Explorer (Win+E), select the folder(s) you want to delete, and press the keys you want in the table below.

    Keyboard Shortcut Action Performed
    Ctrl+D Delete to Recycle Bin
    Del or Delete Delete to Recycle Bin
    Shift+Delete Permanently delete

    2 If you chose to permanently delete, then either click/tap on Yes, press Y, or press Enter to confirm. (see screenshot below)

    Delete Folder in Windows 10-confirm_delete_folder.png






    OPTION TWO

    Delete Folder from File Explorer Ribbon


    1 Open File Explorer (Win+E).

    2 Click/tap on Home tab. (see screenshot below)

    3 Navigate to and select the folder(s) you want to delete.

    4 Perform the action you want to do below:

    A) Click/tap on the Delete button in the ribbon to delete to Recycle Bin.

    OR

    B) Click/tap on the arrow under the Delete button in the ribbon, and click/tap on Recycle or Delete permanently in the drop menu for what you want.

    Delete Folder in Windows 10-delete_folder_file_explorer_ribbon.jpg

    5 If you chose to permanently delete, then either click/tap on Yes, press Y, or press Enter to confirm. (see screenshot below)

    Delete Folder in Windows 10-confirm_delete_folder.png






    OPTION THREE

    Delete Folder from Context Menu


    1 Open File Explorer (Win+E).

    2 Navigate to and select the folder(s) you want to delete.

    3 Perform the action you want to do below:

    A) Right click or press and hold on the selected folder(s), and either press the D key or click/tap on Delete. (see screenshot below)

    Delete Folder in Windows 10-delete_folder_context_menu-1.jpg

    OR

    B) Press and hold Shift key and right click on the selected folder(s), release the Shift key, and either press the D key or click/tap on Delete. (see screenshot below)

    Delete Folder in Windows 10-delete_folder_context_menu-2.jpg






    OPTION FOUR

    Delete Folder in PowerShell


    For more Remove-Item command usage details, see: Remove-Item | Microsoft Docs


    1 Open PowerShell or an elevated PowerShell depending on the required rights to delete the folder you want.

    2 Type the command below you want to use into PowerShell, and press Enter. (see screenshot below)

    (Permanently delete folder)
    Remove-Item -Path "Full path of folder" -Recurse -Force

    OR

    (Delete folder to Recycle Bin if Recycle Bin Properties not set to permanently delete)
    (new-object -comobject "Shell.Application").Namespace(0).ParseName("Full path of folder").InvokeVerb("delete")

    Substitute Full path of folder in the command above with the actual full path of the folder you want to delete.

    For example: Remove-Item -Path "C:\Users\Brink\Desktop\Folder" -Recurse -Force

    Delete Folder in Windows 10-delete_folder_powershell.png

    3 When finished, you can close the Powershell window if you like.






    OPTION FIVE

    Delete Folder in Command Prompt


    For more rd command usage details, see: rd | Microsoft Docs


    1 Open a command prompt or an elevated command prompt depending on the required rights to delete the folder you want.

    2 Type the command below you want to use into the command prompt, and press Enter. (see screenshot below)

    (Permanently delete folder)
    rd /s /q "Full path of folder"

    OR

    (Delete folder to Recycle Bin if Recycle Bin Properties not set to permanently delete)
    PowerShell (new-object -comobject '"Shell.Application"').Namespace(0).ParseName('"Full path of folder"').InvokeVerb('"delete"')

    Substitute Full path of folder in the command above with the actual full path of the folder you want to delete.

    For example: rd /s /q "C:\Users\Brink\Desktop\Folder"

    Delete Folder in Windows 10-delete_folder_command_prompt.jpg

    3 When finished, you can close the command prompt window if you like.






    OPTION SIX

    Permanently Delete Folder in Command Prompt at Boot


    1 Boot to a command prompt at boot.

    2 To Verify Drive Letter the Folder is in at Boot

    The drive letter may not always be the same at boot as in Windows, so be sure to verify its drive letter before doing the command in step 3 below for this to work.

    A) Type diskpart into the command prompt, and press Enter. (see screenshot below)

    B) Type list volume into the command prompt, and press Enter.

    C) From the listed volumes, look for and verify the drive letter of the drive that includes the folder you want to delete.

    D) In the command prompt, type exit, and press Enter.

    Delete Folder in Windows 10-delete_folder_command_prompt_at_boot-1.jpg


    3 To Delete the Folder

    A) Type the command below into the command prompt, and press Enter. (see screenshot below)

    rd /s /q "Full path of folder"

    Substitute Full path of folder in the command above with the actual full path of the folder you want to delete. Be sure to use the correct drive letter from step 2.

    For example: rd /s /q "D:\Windows.old"


    B) Close Delete Folder in Windows 10-close.jpg the command prompt.

    Delete Folder in Windows 10-delete_folder_command_prompt_at_boot-2.jpg

    4 Click/tap on the Continue button to restart the computer and continue to Windows 10. (see screenshot below)

    Delete Folder in Windows 10-delete_folder_command_prompt_at_boot-3.jpg






    OPTION SEVEN

    Permanently Delete Folder using a BAT file


    This option will permanently delete folders that cannot be deleted by normal means.

    Special thanks to Matthew Wai for providing the .bat file in this option.


    1 Download the Permanently_delete_a_folder.bat file below to your desktop.
    2 Unblock the downloaded .bat file.

    3 Run the .bat file.

    4 If prompted by UAC, click/tap on Yes to approve running the .bat file elevated (run as administrator).

    5 Browse to and select the folder you want to permanently delete, and click/tap on OK. (see screenshot below)

    Delete Folder in Windows 10-select-_folder.jpg

    6 Press D (confirm delete) or C (cancel) for what you want. (see screenshot below)

    Delete Folder in Windows 10-confirmation.jpg


    That's it,
    Shawn






  1. Posts : 7,607
    Windows 10 Home 20H2
       #1

    @Brink, I have been playing with the creation of Windows PE, during which some temp folders have been created and cannot be deleted afterward. A gifted member, Try3, has devised the following simple method of deletion:

    1. Create an empty folder, e.g. "D:\Empty_folder"
    2. Copy the following command into elevated Command Prompt:

    RoboCopy "D:\Empty_folder" "D:\unwanted_folder" /MIR

    3. Replace D:\unwanted_folder with the actual path of the folder to be deleted and then press [Enter] to run the command.
    4. On completion, D:\unwanted_folder will become an empty folder, which can then be deleted by normal means.

    Brink, would you consider adding the above method into this tutorial?
      My Computer


  2. Posts : 68,954
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    Hello @Matthew Wai,

    That appears to be a command line method to copy a folder to another location using the robocopy command.

    This doesn't appear to be the same as in the tutorial for deleting folders.
      My Computers


  3. Posts : 7,607
    Windows 10 Home 20H2
       #3

    Brink said:
    That appears to be a command line method to copy a folder to another location using the robocopy command.
    In this case, the copied folder is an empty folder, while another location is a folder that needs to be deleted. As a result, "another location" will become an empty folder and can then be deleted. So, RoboCopy is used as a method for deleting a folder that cannot be deleted otherwise.
      My Computer


  4. Posts : 68,954
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

    Matthew Wai said:
    In this case, the copied folder is an empty folder, while another location is a folder that needs to be deleted. As a result, "another location" will become an empty folder and can then be deleted. So, RoboCopy is used as a method for deleting a folder that cannot be deleted otherwise.
    Interesting workaround.
      My Computers


  5. Posts : 7,607
    Windows 10 Home 20H2
       #5

    Brink said:
    Interesting workaround.
    The interesting workaround has been translated into the following batch script:

    Permanently_delete_a_folder.bat

    It will permanently delete folders that cannot be deleted by normal means. Would you consider adding it into this tutorial?Users only have to (1) select a folder and (2) make a confirmation as shown below:

    Delete Folder in Windows 10-1.-select-folder.jpg

    Delete Folder in Windows 10-2.-confirmation-needed.jpg
      My Computer


  6. Posts : 68,954
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #6

    Matthew Wai said:
    The interesting workaround has been translated into the following batch script:
    Thank you Matthew. This has now been added as option 7 in the tutorial.
      My Computers


 

Tutorial Categories

Delete Folder in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:15.
Find Us




Windows 10 Forums