This article will show you ways to force delete a file in Windows 10/8/7, using Command Prompt or via Windows PowerShell.

Sometimes you may need to delete a file in Windows but it won’t delete. Rather Windows will show you a message that you don’t have permissions, or if the file is in use. In other cases, the file is being deleted and you see no progress for long time. This might be frustrating for users and they seek to force delete the file, which this article will explore.

How To Force Delete A File In Windows

So when you see the file in use message but you’re pretty sure that file is not being used anywhere and you want to force delete the file, try either of methods mentioned below.

How To Force Delete A File In Windows 10/8/7

Method 1 – Using Command Prompt

1. Open Command Prompt as administrator.

2. In Command Prompt window, navigate to that file’s folder location, which you want to force delete. Once you’re in that folder, type del /p /f <FILE NAME> and press Enter key. Or alternatively, you can directly execute del /p /f <FILE LOCATION> command. As we’ve used /p parameter, so you will be asked for confirmation while force deleting the file. If you like, you can skip /p paramater and directly use del /f <FILE LOCATION>. Note that /f parameter is used to force delete the file specified.

How To Force Delete A File In Windows

3. Once the command is executed successfully and you manually verified that file is deleted, close Command Prompt.

Method 2 – Using Windows PowerShell

1. In Windows 10, right click Start Button or press W8K + X keys and select Windows PowerShell (Admin). In previous Windows OS, you can use Windows Search for ‘powershell’ term and select Windows PowerShell from results and select Run as administrator.

2. In administrative Windows PowerShell window, type/paste following and press Enter key:

Remove-Item –path '<FILE LOCATION HERE>' - force

* Substitute <FILE LOCATION HERE> with exact file location you want to force delete. For example, Remove-Item –path 'C:\Users\Kapil Arya\Desktop\File1.txt' - force. If the command doesn’t consists of space, you can remove quotes. For example, Remove-Item –path C:\Users\KapilArya\Desktop\File1.txt - force should work but Remove-Item –path C:\Users\Kapil Arya\Desktop\File1.txt - force will not execute unless you put file location in quotes.

How To Force Delete A File In Windows

3. Once the command is executed successfully, you can close Windows PowerShell.

That’s it!

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Comments

  • Kapil Arya : ^^ Re-register Camera app:

    4 hours ago

  • vartika : Hi! i had an issue on my laptop where the camera wasnt working even wh...

    22 hours ago

  • Kapil Arya : ^^ Is your system part of domain?...

    1 day ago

  • John Wayner : I have a unique problem with this error. I am able to input my pass...

    2 days ago

  • Kapil Arya : ^^ You need to install generic Bluetooth device available on your syst...

    2 days ago