windows强制删除文件_如何强制Windows删除文件

windows强制删除文件

Sometimes, for whatever reason, Windows will become convinced a given file is in use by a program and prevent it from being deleted, moved or renamed. This locking up of files is incredibly frustrating, especially when you know the file is not, in fact, being used. Here are two ways to get around that issue.

有时,无论出于何种原因,Windows都会确信程序正在使用给定文件,并阻止该文件被删除,移动或重命名。 文件的这种锁定令人难以置信的令人沮丧,尤其是当您知道实际上并未使用该文件时。 这是解决该问题的两种方法。

1.使用Windows强制删除 (1. Force delete using Windows)

First, open the command prompt. To do this, start by opening the Start menu (Windows key), typing run, and hitting Enter. In the dialogue that appears, type cmd and hit Enter again.

首先,打开命令提示符。 为此,请先打开“开始”菜单(Windows键),键入run ,然后按Enter。 在出现的对话框中,键入cmd然后再次按Enter。

Run dialogue box

With the command prompt open, enter del /f filename, where filename is the name of the file or files (you can specify multiple files using commas) you want to delete. Microsoft’s documentation describes more details on advanced deletion methods using this command.

打开命令提示符后,输入del /f filename ,其中filename是要删除的一个或多个文件的名称(可以使用逗号指定多个文件)。 Microsoft的文档描述了有关使用此命令的高级删除方法的更多详细信息。

Note that to delete the file you’ll need to either include the full path of the file where you replace filename, or navigate to the folder it is contained in using cd folderpath, and then run the del command. See the image below for an example of the latter method.

请注意,要删除该文件,您需要包括替换filename的文件的完整路径,或者使用cd folderpath导航到该文件所在的文件夹,然后运行del命令。 有关后一种方法的示例,请参见下图。

Using the command prompt

2.使用解锁器 (2. Use Unlocker)

Unlocker application

Unlocker is a free program that simplifies the deletion of locked files. It adds a context menu item to Windows Explorer, and can be activated by right-clicking. It also allows the user to rename or move a locked file.

Unlocker是一个免费程序,可简化锁定文件的删除。 它将上下文菜单项添加到Windows资源管理器,并且可以通过右键单击来激活。 它还允许用户重命名或移动锁定的文件。

There you have it, two simple methods for fixing a stubborn issue!

有了,有两种简单的方法可以解决顽固的问题!

翻译自: https://www.sitepoint.com/force-windows-delete-file/

windows强制删除文件

  • 1
    点赞
  • 0
    评论
  • 3
    收藏
  • 扫一扫,分享海报

参与评论 您还未登录,请先 登录 后发表或查看评论
©️2022 CSDN 皮肤主题:编程工作室 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值