How to delete a file that is in use

Source: Internet
Author: User
Tags safe mode

Do not enter Safe mode, do not borrow third-party tools, delete the files in use two strokes.

I believe you must have encountered because the file is being used and can not delete the problem, now teach you two strokes, only with the system itself can be done with the function. The idea is actually very simple, is to let the file being used is not in use on it. Now to solve this problem:

First disk scan

See this topic everybody don't be depressed, how can disk scan be able to do? Actually ScanDisk has a parameter/x that forces the handle of the specified disk open file to be closed. It is the use of this to solve the problem.

Suppose E: There is a file in use and cannot be deleted.

Step One: Close the program or file that is known to be running on E: After all, files that can be closed in normal ways are closed with normal methods.

Step two: Run CMD Open the Command Prompt window and enter CHKDSK E:/x. If there is no accident, the system will show E: has been forcibly removed, all open handles will be invalid, which means that all open files on E: Have been forced off, and you can delete the files you want to delete after the disk is scanned.

Special Note:

This method does not apply to the system disk on which Windows resides and to the disk on which virtual memory resides. For example, if you have Windows installed in C:, then C: cannot be forced to unload. If the virtual is stored in D:, then D: also cannot be forced to unload.

The second trick is to use NTFS security settings

To use this method, you must ensure that the disk is an NTFS file system.

First, locate the file that you are using that cannot be deleted, open its properties, and select the Security tab (XP wants to cancel the use of simple File sharing in Folder Options) to display the item. , click the Advanced button, open the Advanced Options page, and remove the option to inherit permissions from the parent folder. In addition to their own login in the list of all the other delete, then click the "Edit" button to edit your own access rights, only check the "delete" permission, other such as "read" the "Execute" permission, and so on all cancel or reject, determine the restart computer. No user has permission to read the file after the computer restarts, and the file will not become "files in use" naturally. And your own account has the right to delete, you can easily delete the file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.