克服“它被另一个人或程序使用”。

时间:2021-06-10 01:18:25

Is there a way to unlock Windows files without downloading a utility?

有没有办法解锁Windows文件而无需下载实用程序?

I have a few files on my Windows XP C: drive that are very old and very useless. When I try to delete these files I get the following message:

我的Windows XP C:驱动器上有一些文件非常陈旧且非常无用。当我尝试删除这些文件时,我收到以下消息:

Cannot delete FILENAME.zip: It is being used by another person or program

Close any programs that might be using the file and try again.

No one is accessing this file. No program is using it currently. Windows has screwed up the file locking mechanism.

没有人访问此文件。目前没有程序正在使用它。 Windows搞砸了文件锁定机制。

Is there a way to delete this file without downloading someone's unlocking utility? I find the sites offering these programs to be a tad sketchy.

有没有办法删除此文件而无需下载某人的解锁实用程序?我发现提供这些程序的网站有点粗略。

How could you force the file to unlock from within a program? I'm competent in Java, Perl, and Ruby, but I haven't seen anything among their libraries that would aid me here.

你怎么能强制文件从程序中解锁?我有能力使用Java,Perl和Ruby,但我在他们的库中没有看到任何可以帮助我的东西。

8 个解决方案

#1


28  

I've successfully used Process Explorer to find out which process has the file open. It saves a reboot that may not fix the problem anyway.

我已成功使用Process Explorer找出文件打开的进程。它可以节省重启,无论如何都无法解决问题。

#2


8  

Try downloading "Unlocker". Google it and take my words that it doesn't have any worm/spyware/virus. It is pretty cool utility and works great. Give it a try.

尝试下载“Unlocker”。谷歌它并且我的话说它没有任何蠕虫/间谍软件/病毒。这是非常酷的实用工具,效果很好。试试看。

#3


5  

Did you try the commandline command OpenFiles

您是否尝试过命令行命令OpenFiles

It is built in (XP and above I believe) and has several arguments that can be passed in.

它内置(我相信XP及以上版本)并且有几个可以传入的参数。

#4


2  

Use msconfig and start up with everything turned off.

使用msconfig并在关闭所有内容的情况下启动。

Then try to move / delete the file.

然后尝试移动/删除文件。

Or you can always boot up in safe mode and delete it.

或者您始终可以在安全模式下启动并删除它。

You do that by hitting f8 when the machine boots up.

你可以通过在机器启动时按f8来实现。

#5


1  

If you reboot and the files are still locked, then there is some process on your machine that is still using them. First you should figure out what that process is and determine if the files really aren't used any more or not.

如果您重新启动并且文件仍然处于锁定状态,那么您的计算机上仍有一些进程仍在使用它们。首先,您应该弄清楚该过程是什么,并确定文件是否真的不再使用或不再使用。

#6


1  

Rebooting to Safe Mode is often a very easy way to do it. When you boot in safe mode, it won't load all the stuff set to run on startup. Press F8 while it's booting to access the boot menu, and choose "safe mode".

重新启动到安全模式通常是一种非常简单的方法。在安全模式下启动时,它不会加载设置为在启动时运行的所有内容。在F8启动时按F8进入启动菜单,然后选择“安全模式”。

#7


1  

I had a .jpg pfile that hasd that issue and I couldn't delete. That brought me to this thread. When nothing else worked I renamed the file and left off the .jpg. THEN I could delete it easily. Not sure why, but worked for me

我有一个带有该问题的.jpg pfile,我无法删除。这让我想到了这个主题。当没有其他工作时,我重命名了文件,并离开了.jpg。然后我可以轻松删除它。不知道为什么,但为我工作

#8


0  

You don't need any utility. Just use Win32 api to unlock them (simply close the handle)

你不需要任何实用程序。只需使用Win32 api解锁它们(只需关闭手柄)

#1


28  

I've successfully used Process Explorer to find out which process has the file open. It saves a reboot that may not fix the problem anyway.

我已成功使用Process Explorer找出文件打开的进程。它可以节省重启,无论如何都无法解决问题。

#2


8  

Try downloading "Unlocker". Google it and take my words that it doesn't have any worm/spyware/virus. It is pretty cool utility and works great. Give it a try.

尝试下载“Unlocker”。谷歌它并且我的话说它没有任何蠕虫/间谍软件/病毒。这是非常酷的实用工具,效果很好。试试看。

#3


5  

Did you try the commandline command OpenFiles

您是否尝试过命令行命令OpenFiles

It is built in (XP and above I believe) and has several arguments that can be passed in.

它内置(我相信XP及以上版本)并且有几个可以传入的参数。

#4


2  

Use msconfig and start up with everything turned off.

使用msconfig并在关闭所有内容的情况下启动。

Then try to move / delete the file.

然后尝试移动/删除文件。

Or you can always boot up in safe mode and delete it.

或者您始终可以在安全模式下启动并删除它。

You do that by hitting f8 when the machine boots up.

你可以通过在机器启动时按f8来实现。

#5


1  

If you reboot and the files are still locked, then there is some process on your machine that is still using them. First you should figure out what that process is and determine if the files really aren't used any more or not.

如果您重新启动并且文件仍然处于锁定状态,那么您的计算机上仍有一些进程仍在使用它们。首先,您应该弄清楚该过程是什么,并确定文件是否真的不再使用或不再使用。

#6


1  

Rebooting to Safe Mode is often a very easy way to do it. When you boot in safe mode, it won't load all the stuff set to run on startup. Press F8 while it's booting to access the boot menu, and choose "safe mode".

重新启动到安全模式通常是一种非常简单的方法。在安全模式下启动时,它不会加载设置为在启动时运行的所有内容。在F8启动时按F8进入启动菜单,然后选择“安全模式”。

#7


1  

I had a .jpg pfile that hasd that issue and I couldn't delete. That brought me to this thread. When nothing else worked I renamed the file and left off the .jpg. THEN I could delete it easily. Not sure why, but worked for me

我有一个带有该问题的.jpg pfile,我无法删除。这让我想到了这个主题。当没有其他工作时,我重命名了文件,并离开了.jpg。然后我可以轻松删除它。不知道为什么,但为我工作

#8


0  

You don't need any utility. Just use Win32 api to unlock them (simply close the handle)

你不需要任何实用程序。只需使用Win32 api解锁它们(只需关闭手柄)