How do you force delete a file that Cannot be found?

Quick Answer

There are a few methods you can try to force delete a file that cannot be found:

  • Use the DEL /F command in Command Prompt to force delete the file.
  • Unhide any hidden files and folders, then try deleting again.
  • Take ownership of the file, grant yourself full permissions, and try deleting again.
  • Use a third party tool like Unlocker to delete the file.
  • Restart your computer and try deleting the file again.

The most common reason a file cannot be found is because it is hidden or in use by another process. Using the DEL /F command or a tool like Unlocker will override these restrictions and force delete the file.

What does “file cannot be found” mean when deleting?

When you try to delete a file in Windows and get an error saying the “file cannot be found”, it typically means one of several things:

  • The file is hidden. Windows hides certain system files and folders by default.
  • The file is already deleted. You may be trying to delete a file that has already been removed.
  • Access is denied. You don’t have permissions to delete the file.
  • The file is in use. Another program may be using that file.
  • Invalid file path. The file location or name you specified doesn’t exist.
  • Drive errors. Problems with the hard drive can cause “file not found” errors.

So in summary, the “cannot be found” error usually means the file is already gone, hidden, has restricted permissions, is currently in use, or the file path is wrong. It’s not necessarily because the file is damaged or corrupt in some way.

How to check if a file is hidden in Windows

Here are some ways to check if a file is hidden in Windows:

  • Open File Explorer and look for faded file icons – these indicate hidden files.
  • Toggle the “Hidden items” option in Folder Options to show hidden files.
  • Use the attrib command in Command Prompt to view a file’s attributes.
  • Use the dir /a command to list all files including hidden ones.
  • Install third party software like Unlocker that can detect hidden files.
  • Check the properties of the folder – if “Hidden” is checked, files will be hidden.

Files and folders may be hidden if they contain sensitive system data or are used by programs in the background. Users can hide files manually as well.

So if you get a “file not found” error when trying to delete, turn on the option to view hidden files and see if the file shows up before assuming it’s already gone.

How to take ownership and get full permissions for a file

To take ownership and get full permissions for a file in Windows:

  1. Right click the file and select Properties.
  2. Go to the Security tab and click Advanced.
  3. Click the Owner tab and change the owner to your username.
  4. Check the box to replace the owner on all child objects and containers.
  5. Click OK to apply the changes.
  6. Go back to the Security tab and give your user Full Control permissions.
  7. Click OK to confirm the permission changes.

Now you should have full ownership and permissions to delete, modify or move the file even if access was denied before.

Taking ownership and updating permissions can help resolve access denied errors when trying to delete stubborn files in Windows.

How to use the DEL Command to force delete

The DEL command in Command Prompt is a great way to force delete any file that cannot be found or removed through normal methods.

Here is the basic syntax to use DEL to force delete a file:

DEL /F "C:\Folder\file.txt"

To break this down:

  • /F means force delete the file without confirmation.
  • “C:\Folder\file.txt” is the path and name of the file to delete.

So this will force delete the file.txt in the C:\Folder directory.

Some other options you can use with DEL /F:

  • /S – Delete all files in a folder and its subfolders.
  • /Q – Quiet mode, don’t ask for confirmation on wildcards.
  • /A – Force delete read-only files.

So in summary, DEL /F is very handy for force deleting any file that cannot be removed through the normal interface or Recycle Bin.

Using Unlocker to delete files that cannot be found

Unlocker is a free utility that can force delete any file, folder or drive on Windows. It’s very useful when you get “access denied” errors when trying to delete a file.

Here is how to use Unlocker:

  1. Download and install Unlocker.
  2. Right-click on the file or folder you want to delete.
  3. Select Unlocker from the right-click menu.
  4. Choose Delete from the Unlocker options.
  5. Unlocker will force delete the file or folder.

Unlocker works by closing handles that may be locking the file, stopping background processes using it, and overriding any permissions restrictions.

Some key benefits of using Unlocker:

  • Simple graphical interface for force deleting files.
  • Can delete files even if Explorer gives “access denied”.
  • Works on Windows 10, 8, 7 and Vista.
  • Lightweight program, no installation needed.

So if you have a file that cannot be found or deleted normally, try using Unlocker to force remove it.

Restarting your PC to delete locked files

One simple solution to “file cannot be found” errors is to restart your computer and try deleting the file again.

How can restarting help?

  • Closes any apps or processes locking the file.
  • Clears any memory caches or handles for the file.
  • Refreshes drive and file permissions.
  • Resets any stuck paths or directory issues.

In many cases, a quick reboot will allow you to delete a file that was giving “access denied” or “cannot be found” errors previously.

However, a normal restart may not help if:

  • The file is hidden or has restrictive permissions set.
  • You have drive errors like bad sectors.
  • The file path is completely invalid.
  • You have malware or virus infections.

So restarting the PC is a good first step, but use the other force delete methods on this page if a simple reboot doesn’t do the trick.

Deleting Invalid File Paths

Sometimes you may try to delete a file and get a “cannot be found” error because the path or filename is invalid.

For example, trying to delete:

C:\Users\Name\Documents\report.pdf.tmp

When no such path exists. This can happen if you typed the location wrong or the file was already moved.

If you’re sure the path is incorrect, here are some tips:

  • Double check the location, name and extension are correct.
  • Search your system to make sure it doesn’t exist elsewhere.
  • Open Command Prompt and use DIR to verify files in that directory.
  • Delete the invalid path text string from any scripts or code.
  • Use a wild card delete instead, like DEL C:\Junk\*.*

Deleting an invalid file path will give an error, but isn’t dangerous or a cause for concern on its own. The “file not found” simply means that specific path doesn’t exist.

How to recover deleted files

If you accidentally delete an important file, there are some recovery options:

  • Restore from Recycle Bin – Recently deleted files go to the Recycle Bin.
  • Previous Versions – Restore earlier versions of files if System Restore is enabled.
  • Cloud backups – Retrieve files from cloud storage like Dropbox.
  • File recovery software – Programs like Recuva can scan and recover deleted files.
  • Undelete utilities – Tools like TestDisk can recover deleted files on some drives.

However, there are cases where files cannot be recovered:

  • The Recycle Bin was emptied.
  • The file was deleted from an SSD or flash drive.
  • Too much new data was written after deletion.

So it’s important to be very careful when permanently deleting files using the force delete methods covered in this article. Have backups and recovery options ready in case you delete something important by accident.

Conclusion

While frustrating, the “file cannot be found” or “access denied” errors when trying to delete a file are usually straightforward to resolve.

Methods like taking ownership, using DEL /F, Unlocker, restarting the PC, and checking for hidden files can force delete nearly any file.

Be very careful with deletions, have backups, and understand the file paths you are specifying. With some patience and the right tools, you can delete any file that cannot be found or previously gave you an access error.