Home » Questions » Computers [ Ask a new question ]

# Find out which process is locking a file or folder in Windows

 Find out which process is locking a file or folder in Windows How can I find out which process is locking a file or folder in Windows? Asked by: Guest | Views: 57
 Guest [Entry] "PowerShell method: IF((Test-Path -Path $FileOrFolderPath) -eq$false) { Write-Warning ""File or directory does not exist."" } Else { $LockingProcess = CMD /C ""openfiles /query /fo table | find /I """"$FileOrFolderPath"""""" Write-Host \$LockingProcess } The openfiles command needs to have support for local files enabled, by running openfiles /local on and restarting. More details How to find out which process is locking a file or folder in Windows archive"