Command-line tool for finding out who is locking a

2019-01-06 11:16发布

I would like to know who is locking a file (win32). I know about WhoLockMe, but I would like a command-line tool which does more or less the same thing.

I also looked at this question, but it seems only applicable for files opened remotely.

6条回答
The star\"
2楼-- · 2019-01-06 11:25

Handle should do the trick.

Ever wondered which program has a particular file or directory open? Now you can find out. Handle is a utility that displays information about open handles for any process in the system. You can use it to see the programs that have a file open, or to see the object types and names of all the handles of a program.

查看更多
Viruses.
3楼-- · 2019-01-06 11:27

enter image description here

Computer Management->Shared Folders->Open Files

查看更多
We Are One
4楼-- · 2019-01-06 11:28

Download Handle.

https://technet.microsoft.com/en-us/sysinternals/bb896655.aspx

If you want to find what program has a handle on a certain file, run this from the directory that Handle.exe is extracted to. Unless you've added Handle.exe to the PATH environment variable. And the file path is C:\path\path\file.txt", run this:

handle "C:\path\path\file.txt"

This will tell you what process(es) have the file (or folder) locked.

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-01-06 11:28

I have used Unlocker for years and really like it. It not only will identify programs and offer to unlock the folder\file, it will allow you to kill the processing that has the lock as well.

Additionally, it offers actions to do to the locked file in question such as deleting it.

Unlocker helps delete locked files with error messages including "cannot delete file," and "access is denied." Video tutorial available.

Some errors you might get that Unlocker can help with include:

  • Cannot delete file: Access is denied.
  • There has been a sharing violation.
  • The source or destination file may be in use.
  • The file is in use by another program or user.
  • Make sure the disk is not full or write-protected and that the file is not currently in use.
查看更多
祖国的老花朵
6楼-- · 2019-01-06 11:38

handle.exe http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx

THis has helped me sooooo many times....

查看更多
Root(大扎)
7楼-- · 2019-01-06 11:41

Handle didn't find that WhatsApp is holding lock on a file .tmp.node in temp folder. ProcessExplorer - Find works better Look at this answer https://superuser.com/a/399660

查看更多
登录 后发表回答