Pubblicato: Aggiornato il: 0 commenti 3,8K Guarda 1 minutes Leggi

How many times does it happen that we receive an error message when we want to delete a file or folder? Often the error message reads:

The action cannot be completed because the folder is open in another program

Let’s see how to figure out which process blocks the resource to be deleted

We use resource monitoring

Resource Monitor is present as far back as Windows 7 to Windows 10, to start it and check the status of the system proceed sat as follows:

Resource monitoring screen
Resource monitoring screen
  • press the WIN-R buttons
  • type “resmon” and give
  • Select the CPU entry
  • now in the search bar inherent in the Associated Handles type the folder or file that we are trying to delete
  • Once we find the handle that locks the resource we can right-click and choose End Process

We use Process Explorer

Another powerful tool that can help us is Process Explorer, from Microsoft’s Sysinternal suite.

You can download it and start it directly live from the sysinternal site, obviously with administrative credentials.

resmon02

Next, click Find > Find Handle or DLL, now specify the name of the file to search for or the path to the locked folder. On the results found we could interact with the right button and choose whether to end them.

We use Powershell

You can also use a powershell tool to check what’s blocking the file or folder.

resmonps03

After downloading and extracting it, just type:

Import-Module C:-Scripts-FindLockingProcess.psm1

Then type:

FindLockingProcess -FileOrFolderPath “C:-test.xlsx”

To have a complete list of available commands, type:

Get-Help FindLockingProcess –Full

Now we should be able to delete the file or folder. If you have any other suggestions, please write them down in the comments.

Angolo di Windows Logo

Punto di riferimento per il mondo Windows con articoli e guide letti ogni giorno, ci trovi anche nella MS Community con gli articoli WIKI del Microsoft MVP (dal 2011 al 2020) Alvise C.

 

Contact us: [email protected]

Questo blog non rappresenta una testata giornalistica in quanto viene aggiornato senza alcuna periodicità.
Non può pertanto considerarsi un prodotto editoriale ai sensi della legge n° 62 del 7.03.2001.
L’autore del blog non è responsabile del contenuto dei commenti ai post, nè del contenuto dei siti linkati.
Alcuni testi o immagini inseriti in questo blog sono tratti da internet e, pertanto, considerati di pubblico dominio; qualora la loro pubblicazione violasse eventuali diritti d’autore, vogliate comunicarlo via email a [email protected] e saranno immediatamente rimossi.