Delete File in Windows 10  

    Delete File in Windows 10

    Delete File in Windows 10

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

    How to Delete a File in Windows 10


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

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

    Deleting a file 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 File using Keyboard Shortcut


    1 Select the file(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 File in Windows 10-confirm.png






    OPTION TWO

    Delete File 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 file(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 File in Windows 10-delete_file_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 File in Windows 10-confirm.png






    OPTION THREE

    Delete File from Context Menu


    1 Open File Explorer (Win+E).

    2 Navigate to the file you want to delete.

    3 Perform the action you want to do below:

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

    Delete File in Windows 10-delete_file_context_menu-1.jpg

    OR

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

    Delete File in Windows 10-delete_file_context_menu-2.jpg






    OPTION FOUR

    Delete File 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 file you want.

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

    (Permanently delete file)
    Remove-Item -Path "Full path of file with extension" -Force

    OR

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

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

    For example: Remove-Item -Path "C:\Users\Brink\Desktop\File.txt" -Force

    Delete File in Windows 10-delete_file_powershell.png

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






    OPTION FIVE

    Delete File in Command Prompt


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


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

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

    (Permanently delete file)
    del /f /s /q /a "Full path of file with extension"

    OR

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

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

    For example: del /f /s /q /a "C:\Users\Brink\Desktop\File.txt"

    Delete File in Windows 10-delete_file_command_prompt.png

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






    OPTION SIX

    Permanently Delete File in Command Prompt at Boot


    1 Boot to a command prompt at boot.

    2 To Verify Drive Letter the File 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 File in Windows 10-delete_file_command_prompt_at_boot-1.jpg


    3 To Delete the File

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

    del /f /s /q /a "Full path of file with extension"

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

    For example: del /f /s /q /a "D:\Users\Brink2\Desktop\File.txt"

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

    Delete File in Windows 10-delete_file_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 File in Windows 10-delete_file_command_prompt_at_boot-3.jpg


    That's it,
    Shawn






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

    @Brink, I found an option to delete a file to Recycle Bin via PowerShell:

    Code:
    (new-object -comobject "Shell.Application").Namespace(0).ParseName("D:\Folder\ABC.txt").InvokeVerb("delete")

    The following one can be used via Command Prompt:
    Code:
    PowerShell (new-object -comobject '"Shell.Application"').Namespace(0).ParseName('"D:\Folder\ABC.txt"').InvokeVerb('"delete"')
      My Computer


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

    Matthew Wai said:
    @Brink, I found an option to delete a file to Recycle Bin via PowerShell:

    Code:
    (new-object -comobject "Shell.Application").Namespace(0).ParseName("D:\Folder\ABC.txt").InvokeVerb("delete")

    The following one can be used via Command Prompt:
    Code:
    PowerShell (new-object -comobject '"Shell.Application"').Namespace(0).ParseName('"D:\Folder\ABC.txt"').InvokeVerb('"delete"')
    Thank you Matthew. Now added to the tutorial.
      My Computers


 

Tutorial Categories

Delete File 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 15:18.
Find Us




Windows 10 Forums