如何找出哪些进程锁定了文件夹或文件?
如何查询正在运行的进程以找出它们锁定了哪些文件夹或文件? (即,您要弹出驱动器,然后被告知无法弹出,因为它正在使用中)
我想要获得“现成的”下载,或者编写一个 .NET 3.5 应用程序来执行此操作(主要是 Windows 问题)。
How do you go about querying running processes to find out what folders or files they have locked? (i.e. you go to eject a drive and you're told that it can't be ejected because it's in use)
I'd like to either get an "off the shelf" download, or write a .NET 3.5 app to do this (primarily a Windows question).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Process Explorer 将向您展示这一点。 Ctrl-F 可以让您搜索文件并列出打开/锁定该文件的进程。 然后,您可以使用 Process Explorer 关闭该句柄。
还有一个名为 oh.exe 的命令行实用程序可供下载。 请参阅此处了解更多详细信息
Process Explorer will show you this. Ctrl-F will let you search for a file and list the process(es) that have that file open/locked. You can then close that handle using Process Explorer.
There's also a command line utility called
oh.exe
available for download. See here for more detailsLockHunter 是一款出色的 Windows 上下文菜单工具。
LockHunter is a great context menu tool for Windows.
我在 Windows 开发机器上放置的第一件事就是 WhoUses 。 这很好,因为它也是开源的。
One of the first things I put on my Windows dev machines is WhoUses. It's nice because it's open source too.
http://www.emptyloop.com/unlocker/(免费软件)有一个特殊的 UI这个情况。
http://www.emptyloop.com/unlocker/ (freeware) has a special UI for exactly this situation.