How to Delete Locked or Undeletable Files or Folders
If you're having trouble deleting a locked or undeletable file or folder from your hard drive, here are some options.
Some of the error messages you might encounter that we can work around include:
Cannot delete file: Access is denied
The file is in use by another program or user
The source or destination file may be in use.
The file or directory is corrupted and unreadable.
Make sure the disk is not full or write-protected and that the file is not currently in use.
There has been a sharing violation.
Video tutorial:
How to Delete Locked or Undeletable Files or Folders - Reboot
A file that is in use can't be deleted, so try rebooting. Optionally, you can boot into Safe Mode, which increases the file's odds of not being in use.
How to Delete Locked or Undeletable Files or Folders - PowerShell or Command Prompt
To delete a file, type in del "Path of File". Replace "Path of File" with the path to the file to delete without quotes.
To delete a folder and all of the subfolders and files, you can use either RD or RMDIR. To delete an entire folder and all subfolders, type in rd /s "Path of Folder". Replace "Path of Folder" with the path to the folder to delete without quotes.
How to Delete Locked or Undeletable Files or Folders - Third-Party Apps
The easiest way to delete an undeletable file or folder is to use a third-party app.
Unlocker Portable is the easiest, best freeware application to unlock your files or folders without installing an app.
The app is easy to use, but if you need help, here's a video tutorial.