Workarounds that cannot be deleted in Windows

xiaoxiao2021-03-05  26

Workarounds that cannot be deleted in Windows

Sometimes we are deleting a file or folder, the system prompt cannot be deleted, which is really a headache. Now let's take a look at the solution.

I. General Solution:

1. Cancel or restart your computer and try to delete it.

2 . Enter "Security Mode Delete".

3. Use DEL, DELTREE, and RD commands to delete it under the pure dos command line.

4. If there is a relatively large subdirectory or file in the folder, you cannot delete it, you can delete the subdirectories and files in the folder, and then delete the folder.

5. End the Explorer.exe process in the task manager and then delete the file at the command prompt window.

6. If you have several software installed ACDSEE, FlashFXP, Nero, Total, you can try to delete a folder in these software.

Second, advanced solutions:

1. Disk error

Run disk scan and scan files in partitions, and make sure before scanning, you have selected the file and bad sector, fully scan all options, and then delete files.

2. Pre-reading mechanism:

Certain media playback disrupts or is not deleted when preview. Enter: regsvr32 / u shMedia.dll in the Run box, log off the pre-reading function. Or delete this key value in the registry: [HKEY_LOCAL_MACHINE / SOFTWARE / CLASS / CLSID / {87D62D94-71B3-4B9A-9489-5FE6850DC73E} / inprocServer32].

3. Firewall:

Since the anti-virus software occupies the file being checked, the prompt file is being used when the execution is deleted, and you can try to temporarily turn off its instant monitor, perhaps can be resolved.

4. Office, WPS series software:

The illegal shutdown of Office will also cause files that cannot be deleted or changed. Run the program, then close, then delete the file.

5. With WinRar:

Right click on the folder you want to delete and select Add to Compressed File. Select "Remove the source file after the compression," write a compressed package name, click OK.

6. Permissions issue:

If it is a 2000 and XP system, please determine if there is permission to delete this file or folder.

7. Removeable file:

If the DLL dynamic link library file called by the executable file or the program is not released in memory, it will prompt the file when deleting, the solution is to delete the system's page file, Win98 is Win386.SWP, Win2000 / XP is pagefile.sys. Note To remove it under DOS.

8. File Crushing:

Use the file crusher, such as File Pulverizer, you can completely remove some stubborn files.

Third, make a "file safe" that cannot be deleted

The folder cannot be deleted, not necessarily a bad thing, if you put some important files in this directory, can you avoid accidentally deletion? A file name only contains a space folder in Windows that is not allowed to create and delete, but in DOS, you can create a folder containing / fold.

Unable to delete files or folders

Article ID: 320081

Last update date: May 31, 2004

Version: 1.0

This page

summary

More information

summary

You may not be able to delete files or folders on the NTFS file system volume. This article describes the following two aspects: Why you may not be able to delete files or folders on the NTFS volume, and how to solve the various reasons for this problem to eliminate this issue. More information

Note: Inside, NTFS regards folders as a special type of file. Therefore, the term "file" in this article may refer to the file, or it may refer to the folder.

Cause 1: Document uses access control list

If a file uses the Access Control List (ACL), you may not be able to delete the file. To resolve this issue, change the permissions on the file. You may need to have ownership of these files to change the permissions.

The administrator has an implied ability to obtain ownership of any files, even if it is not clearly granted to them any permissions for this file. The file owner has an implicit ability to modify file permissions, even if it is not clearly granted to any permissions for this file. Therefore, you may need to get ownership of a file, give yourself to delete the file, and then delete the file.

Because files use irregular ACLs without using certain security tools to display or modify their permissions

To resolve this issue, use another tool (for example, the update version of Cacls.exe).

Depending on the type of type, the access control (ACE) in the ACL has a specific priority. For example, the ACE rejected access is generally located before the ACE granted access. However, we cannot prevent a program from writing ACE ACEs in any order. In some earlier versions of Windows, there will be problems when Windows attempts to read these "irregular" ACLs. In some cases, these ACLs cannot be correctly modified by using the Windows Explorer Graphic Security Editor. This issue is corrected in a later version of Windows. If you have encountered this problem, use the latest version of Cacls.exe. You can also write a new ACL that allows you to access the file even if you cannot display or edit an existing ACL.

Cause 2: Document is in use

If the file is in use, you may not be able to delete the file. To resolve this issue, make sure to have the process that opens the handle and close this process.

You may not be able to delete the files in use depending on the documentation. At any time, you can use a variety of tools to help determine how to have a file open handle.

To learn more about the process that can be used to determine the process with files to open the handle, click the following article number to see the article in the Microsoft Knowledge Base:

242131 How to display a list of processes with open files

172710 How to use the OH tool in the Windows NT 4.0 resource package

The "symptom" of this issue may be diverse. You may be able to delete a file using the delete command, but before the file is turned on, the file is not deleted before the file is released. In addition, you may not be able to access the security dialog that is being deleted. To resolve this issue, make sure to have the process that opens the handle and close this process.

Cause 3: File system damage allows you to access this file

If the file system is destroyed, this file may not be deleted. To resolve this issue, run the CHKDSK utility on the disk volume to correct any existence errors.

Decourse, other hardware failures, or software errors on disk may damage file systems to make files. A typical way of failure may vary. When the file system detects corruption, it will record an event in the event log, and you will usually receive a prompt you to run Chkdsk. According to the damaged nature, CHKDSK may not be able to recover file data; however, Chkdsk can return the file system to a state in which the file system is consistent.

For additional information about how to use the Chkdsk utility, click the article number below to view the article in the Microsoft Knowledge Base: 176646 Error message: File or directory corruption ...

187941 Interpretation of CHKDSK and new / c and / i switches

Cause 4: The file is located in the path than the maximum number of characters (Max_Path) characters.

If there is a problem with the file path, you may not be able to open the file.

Solution 1: Access the file using the auto-generated 8.3 name

To resolve this issue, you may need to access the file using the auto-generated 8.3 name. If the reason is that the folder name is too long, this may be the easiest solution. If the 8.3 path is too long, or if the 8.3 name has been disabled on the volume, then go to Solution 2.

For additional information about the 8.3 file name on the NTFS volume, click the article number below to view the article in the Microsoft Knowledge Base:

121007 How to disable the creation of the 8.3 format name on the NTFS partition

Solution 2: Rename or move the road with deep folder

To resolve this issue, rename the folder so that the path depth of the target file does not exceed Max_Path. To do this, start from the root folder (or any other convenient location), then rename the folder, shorten their names. If this step does not resolve this issue (for example, if the depth of the file exceeds 128 folders), go to Solution 3.

Solution 3: Use a network sharing with the same depth with the folder

If the solution 1 or solution 2 is not convenient, or if you don't resolve the problem, create a network share, which is as deep as possible in the folder tree, and then rename the folder by accessing this sharing.

Solution 4: Use tools that can traverse deep path

Many Windows programs assume that the maximum path length is less than 255 characters; therefore, these programs are only assigned internal storage that is sufficient to accommodate these typical paths. NTFS does not limit this restriction, it can accommodate longer paths.

If you create a shared in a folder structure, you can create a deep structure by using this sharing under this location, this problem may be encountered. Some tools that perform local operations on the folder tree may not be able to traverse the entire folder tree starting from the root folder. You may need to use these tools in a special way so that they can traverse the shared location. (CREATEFILE API document illustrates a method of traversing the entire folder tree in this case.)

In general, you can manage these files by using software for creating files. If there is a program, it can create files that exceed MAX_PATH, so in general you can use this same program to delete or manage these files. You can usually delete the files created in the same share by using sharing.

Cause 5: File name includes a reserved name in Win32 namespace

If the file name includes a reserved name in the Win32 namespace (for example, "LPT1"), this file may not be deleted. To resolve this issue, rename the file using a non-Win32 program. You can use this file using the POSIX tool or any other tool using the appropriate internal syntax.

Also, if you specify the path to the file using a specific syntax, you may be able to use a built-in command to bypass the typical Win32 reserved name check. For example, if you use the DEL command in Windows XP, you can delete a file name "LPT1" when using the following special syntax to specify the full path to the file:

DEL / /? / C: / file path / LPT1

For additional information about files with preserved names in Windows NT and Windows 2000, click the article number below to view the article in the Microsoft Knowledge Base: 120716 How to remove files with reserved names in Windows

For additional information about files with files with reserved names under Windows XP, click the article number below to view the article in the Microsoft Knowledge Base:

31522 How to delete files with reserved names in Windows XP

If you open the handle of a file using a typical Win32 CreateFile mechanism, some file names are reserved for old DOS devices. These file names are not allowed to be used backwards, and they cannot be created using typical Win32 file calls. However, this problem is not a restriction of NTFS.

By using the skills used to traverse the folder that exceeds MAX_PATH, you may be able to use the WIN32 program to bypass the typical name check when you create (or delete) files. In addition, some POSIX tools do not need to accept these names.

Cause 6: File name includes invalid name in Win32 namespace

If the file name includes an invalid name, you may not be able to delete the file (for example, a file name has a endless space, or a tailpoint, or the file name is consisting of only one space). To resolve this issue, use a tool that uses the appropriate internal syntax to delete this file. You can use the "//? /" Syntax for some tools to operate these files, for example:

DEL "//? / c: / contain the path of the end of the space file .txt"

Rd //./e:/lame 3.90 / con / s / q Enter

The reason for this problem is similar to the cause 5. However, if you open the file with a typical Win32 syntax, you have a file with a diverse space or a diverted period, the end is removed before opening the actual file. Therefore, if there are two files named "Afile.txt" and "Afile.txt" in the same folder (note the space behind the file name), if you try to open the second file using the standard Win32 call, In fact, open the first file. Similarly, if the name of the file is only "" (a space character), the parent folder of the file will actually open when trying to use the standard Win32 call. In this case, if you try to change the security settings on these files, you may either do it, or accidentally change the settings on other files. If this behavior occurs, you may think that you have an action permission to a file that actually restrictive ACL.

For a variety of reasons

In some cases, you may encounter different combinations of the above reasons, which make the process of deleting files more complicated. For example, if you log in as a computer administrator, you may encounter a reason for 1 (you have no right to delete files) and the reason 6 (the file name contains a tail with characters, causing file access to redirect to other files or not existing files), You may not be able to delete the file. If you try to solve the problem with the ownership and add permissions of the file, you may not be able to delete the file because the ACL editor in the user interface cannot access the correct file due to the reason 6.

In this case, you can change the ownership and operation permission of the file using the SubinAcl utility and / onlyfile switch (this utility included in the Resource Toolkit) (if you do not change, you cannot access), for example:

Subinacl / OnlyFile "//? / c: / There is a problem file path" / setowner = domain / administrator / grant = domain / administrator = f Note: This command is entered in a row; for easy reading has been wrapped.

This example command line modifies the path file of the C: / have problem file containing the trailing space, making the domain / administrator account into the owner of the file and has full control permissions to the file. Now you can use the DEL command and the same "//? /" Syntax to delete this file.

If you can't do it, try the "PCTools" of the old teeth.

转载请注明原文地址:https://www.9cbs.com/read-37315.html

New Post(0)