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
- Option Two: Delete File from File Explorer Ribbon
- Option Three: Delete File from Context Menu
- Option Four: Delete File in PowerShell
- Option Five: Delete File in Command Prompt
- Option Six: Permanently Delete File in Command Prompt at Boot
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)
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.
5 If you chose to permanently delete, then either click/tap on Yes, press Y, or press Enter to confirm. (see screenshot below)
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)
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)
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
3 When finished, you can close the Powershell window if you like.
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"
3 When finished, you can close the command prompt window if you like.
1 Boot to a command prompt 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.
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.
B) Close
For example:del /f /s /q /a "D:\Users\Brink2\Desktop\File.txt"
the command prompt.
4 Click/tap on the Continue button to restart the computer and continue to Windows 10. (see screenshot below)
That's it,
Shawn
Related Tutorials
- How to Rename File in Windows 10
- How to Set Recycle Bin to Permanently Delete Files Immediately in Windows 10
- How to Delete a Folder in Windows 10
- How to Add or Remove Empty Folder context menu in Windows 10
- How to Add Permanently Delete to Context Menu in Windows 10
- How to Add Secure Delete to Context Menu in Windows 10