Sometimes you are faced with an error when you try to delete a file permanently. It may be Spyware, Malware, Ad-ware or any Trojan. In some situations, the file is being used by the essential Windows programs such as Windows Explorer, which prevents it from being removed. If using Task Manager was unsuccessful, you can get rid of these pesky files and delete them forcibly by either completing the process manually or by downloading free and easy applications.

Method 1
Method 1 of 2:

Using an Application

  1. There are many free and safe options that you can find with a little research like Unlocker, LockHunter, and FileASSASSIN. These applications are often used for deleting malware. You can usually download these directly from their website, following their instructions. [1]
  2. If you are using FileASSASSIN, a window will appear that will ask you to select the file you wish to delete. You may either input the file manually by typing it out or go to "Browse" at the bottom of the window. The other applications may vary slightly in layout, but the process will be generally the same.
    Advertisement
  3. Once you have selected the file you want to delete, click on it and then select "delete" from the options that the application provides you.
  4. In a few moments, the file will be deleted and you can close the program. You may want to check the files original location to determine that the delete was successful.
    Advertisement
Method 2
Method 2 of 2:

Using the Command Prompt

  1. In any situation where you are experiencing computer issues, it is always advisable to restart your computer and try the task again before moving on to more drastic measures. If the file continues to be undeletable, move onto the next steps.
  2. You can find this by going to "Start" and then typing "CMD" or "Command Prompt" without the quotation marks into the search bar. You can also do this by clicking ⊞ Win + R on your keyboard.
  3. This will prompt a drop down menu where you can select "Run as Administrator."
    1. You will need to have Admin Access in order to complete this method.
  4. This is where you will input your command in order to delete a file.
  5. This command will look something like the following: . DEL /F /Q /A C:\\Users\\Your username\\The location of the file\\Name of the file you wish to delete . [2]
    1. For example, if you are trying to delete a file named "unwanted.exe," the command will look like this: . DEL /F /Q /A C:\\Users\\Your Username\\Desktop\\unwanted.exe
  6. This will now permanently delete the file. You may want to go back and check the original location of the file to determine that the delete was successful.
    Advertisement

Expert Q&A

Search
Add New Question
  • Question
    How do I know if it's safe to delete a Windows file?
    Michael Thompson-Brown
    Data Management Expert
    Michael Thompson-Brown is a Cybersecurity Expert based in Portland, Maine. He is the owner and founder of PCRescue!, a company that provides cybersecurity and data management solutions to small businesses and individuals. Michael has over 25 years of experience in the IT industry and is a certified ethical hacker. He is passionate about helping clients protect their data and systems from malicious attacks and helping them optimize their online presence and reach. He received a Master’s degree in Cybersecurity and Information Assurance from Western Governors University, and a Bachelor’s degree in Business Administration from the University of Phoenix.
    Data Management Expert
    Expert Answer
    To determine if you can safely delete a Windows file, you can run the check disk (chkdsk) command. Open Command Prompt as an administrator, then type "chkdsk" followed by the drive letter of the disk containing the file you want to check. Press Enter. Chkdsk will scan the disk for errors and provide a report. If it finds issues related to the file you want to delete, it's best to refrain from deleting it to avoid potential system instability. However, if chkdsk completes without detecting any problems related to the file, it's likely safe to delete it. Always exercise caution when deleting system files, as removing essential components can lead to system malfunctions.
  • Question
    Can undeletable files not include spaces?
    Community Answer
    If the file includes spaces, include double quotation marks (") around the start and end of the file path.
  • Question
    Is there any other method to delete the Windows files?
    Community Answer
    Use third-party programs like Unlocker to find and delete Windows files. Consider using DBAN to completely wipe all files.
See more answers
Ask a Question

      Advertisement

      Video

      Tips

      • If you are not aware of what you are doing, then ask a computer expert or a professional to do it for you.
      • If you want to delete the files automatically in Windows XP, download the software from the links in External Links.
      Advertisement

      Warnings

      • Be careful to not delete Operating System files, which may cause your computer to crash or corrupt.
      Advertisement

      Expert Interview

      Thanks for reading our article! If you’d like to learn more about troubleshooting computers, check out our in-depth interview with Michael Thompson-Brown .

      About this article

      Thanks to all authors for creating a page that has been read 247,925 times.

      Is this article up to date?

      Advertisement