Situatie
Solutie
If you want to check if a file is in use in scripts or from the command line, you can use the handle program. After downloading handle, navigate to its directory in Powershell. Then, run the following command:
./handle.exe -a -u "PATH TO LOCKED FILE"
The -a option tells handle to dump all available information on what is using the file, and the -u option tells it to also show the owners name.
To make it convenient to use handle from scripts, you can copy it to your programs folder and add it to your system path. You can also kill the process from your script.
Leave A Comment?