Unable to delete file Access denied reason and solution graphic steps

  

When we use Windows, we have a variety of problems. Even the easiest way to delete a file can be troublesome, either the system prompts "The file is being used by another person or program", or the report is "Access denied" & rdquo;…… Solution. Cause one: The file is in use One problem that is often encountered when deleting files is that the file is in use and cannot be deleted. If you attempt to delete a file that was opened for exclusive access instead of shared access and is in use, an error message will appear: "Unable to delete xxx: the file is being used by another person or program". In the other case, the delete command can be used to delete the file, but the file is not actually deleted until the process that opened the file releases the file. To solve the above problem, you need to determine the process that owns the file open handle and then close the process. In previous versions of Windows, we were able to use the resource kit's Oh.exe. But in XP, the installed Support Tools does not have Oh.exe. However, XP provides a new Openfiles.exe command-line tool that reports on individual files opened by the process. Similar to Oh.exe, Openfiles.exe also requires system kernel monitoring to be turned on, which consumes some memory and reduces the performance of system operations. The command to open the system monitoring is "Openfiles /local on", which will enable the system global flag "maintenance object list", which needs to be restarted to take effect. After restarting the system, execute “ldfiles” with no parameters at the command prompt to see a list of open files for each process. Cause two: File system corruption Bad areas on the disk, other hardware failures, or software errors can damage the file system and cause problems with the file and cannot be deleted. Typical operations may fail in different ways. When a file system corruption is detected, you will usually receive a message prompting Chkdsk to run. If this is the case, you can run the Chkdsk utility on the disk volume to correct any errors that exist. Depending on the nature of the damage, Chkdsk may be able to recover the file data and may not be able to recover, but Chkdsk can return the file system to an internally consistent state. For commands and parameters of the Chkdsk utility, you can execute “Chkdsk /? at the command prompt. ”View. Cause three: The file uses the access control list. If a file uses an Access Control List (ACL) and the operator does not have the corresponding permission, then the file may be deleted when the file is deleted. ” tips. Typically, an administrator has the implicit ability to take ownership of any file, and the file owner also has the implicit ability to modify file permissions. However, these default permissions can be modified. To resolve the problem that files cannot be deleted due to ACLs, you must log in as a user with appropriate privileges, or give yourself permission to delete files before you can delete files. It is important to note that the operator must have ownership of these files in order to change permissions. If the file uses an unregulated ACL and you cannot use some security tools to display or modify its permissions, you can try modifying it with the command line tool Cacls.exe. Reason four: The file name uses a reserved name. It is well known that names like AUX and LPT1 are reserved for legacy DOS devices. For backward compatibility, these file names are not allowed in Windows, nor can they be created using typical Win32 file calls. Conversely, if the file name is a reserved name in the Win32 namespace, it may not be possible to delete the file. To resolve such issues, you can rename or delete the file under Linux or other non-Windows operating systems. In addition, if you can specify a path to the file with a specific syntax, you can also bypass the typical Win32 reserved name check with some built-in commands. For example, using the following command in Windows XP, you can delete the file named "ldt;lpt1" (Del command followed by “?” to avoid the validity of Windows check file name): Del ?c: file path lpt1 reason five : Invalid file name If the file name includes an invalid name, such as a trailing space in the file name, or a trailing period, or the file name consists of only one space, the file may not be deleted. It is worth mentioning that if you use a typical Win32 syntax to open a file with trailing or trailing periods in its name, trailing spaces or periods will be removed before the actual file is opened. Therefore, if there are two files named "ldquo;File.txt" and "File.txt" in the same folder (note the spaces after the second file name), open the second when using standard Win32 calls. When the files are actually opened, the first file is actually opened. Similarly, if the name of the file is only “ <; a space character, when you try to open it with a standard Win32 call, the parent folder of the file is actually opened. In this case, if you try to change the security settings on these files, you may accidentally change the settings on other files. Similar to how to resolve a file name using a reserved name, this file can be deleted using an appropriate internal syntax. For example, to delete a file that contains trailing spaces, you can use the following command: Del ? c: file path (file name of trailing spaces) Cause six: The file path is too deep to access the file in a path deeper than the maximum path character number (MAX_PATH) , may cause the file to be inaccessible, of course, this situation is relatively rare. If the path is deep because the folder name is too long, the easiest solution is to access the file using the automatically generated 8.3 name. If the 8.3 path is too long, you can rename the folders from the root folder and shorten their names so that the path depth of the target file does not exceed MAX_PATH. If the file is deeper than 128 folders, you can access the file by creating a network share that is as deep as possible in the folder tree and then accessing the share. In general, if you encounter a situation where the file path is too deep to be accessible, you can manage these files by using the software that created the file. That is, if you have a program that can create files that are larger than MAX_PATH, we can also use the program to manage these files. In addition, deep-structured files created through network sharing can also be deleted by using the same share.

There are some solutions below. 1. General solutions: 1. Cancel or restart your computer and try deleting again. 2. Go to “Safe Mode Delete”. 3. Use the DEL, DELTREE, and RD commands on the pure DOS command line to remove them. 4. If there are more subdirectories or files in the folder that cannot be deleted, you can delete the subdirectories and files in the folder before deleting the folder. 5. End the Explorer.exe process in Task Manager and delete the file in the Command Prompt window. 6. If you have a few software installed ACDSee, FlashFXP, Nero, Total, you can try to delete the folders in these several software. Second, advanced solutions: 1. Disk error runs the disk scan and scans the partition where the file is located. Before scanning, it is determined that the repair file and bad sectors have been selected, all options are scanned, and the files are deleted after scanning. 2. Read-ahead mechanism: Some media can be deleted if it is interrupted or being previewed. In the "Run" box, type: REGSVR32 /U SHMEDIA.DLL to unregister the read-ahead feature. Or delete the following key in the registry: [HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes \\CLSID\\{87D62D94-71B3-4b9a-9489-5FE6850DC73E}\\InProcServer32]. 3. Firewall: Since the anti-virus software will take up the file being checked when checking the virus, which causes the file to be used when the deletion is performed, you can try to temporarily turn off its real-time monitoring program, which may be solved. 4. OFFICE, WPS series software: illegal shutdown of OFFice will also cause files to be deleted or renamed. Rerun the program, then close normally, and then delete the file. 5. With WinRAR: Right-click on the folder you want to delete and select “Add to Compressed Files”. In the pop-up dialog box, select “ delete the source file after compression, & rdquo; just write a compressed package name, click OK. 6. Permission issues: If it is 2000 and xp or higher, please first determine if you have permission to delete this file or folder. 7. Executable file deletion: If the executable file or the DLL dynamic link library file called by the program is not released in memory, the file will be prompted when it is deleted. The solution is to delete the system page file. Win98 is Win386.SWP, Win2000/XP is pagefile.sys. Be careful to delete it under DOS. 8. File shredding: Using a file shredder, such as File Pulverizer, you can completely remove stubborn files. Third, make a file safe that can not be deleted "File safe" & rdquo;: folder can not be deleted, not necessarily a bad thing, if you put some important files in this directory, can you avoid accidental deletion? A folder with a file name containing only spaces is not allowed to be created and deleted in Windows, but in DOS it is possible to create a folder with a file name containing \\. The above describes several reasons why the files or folders in the Windows system cannot be deleted and how to solve them. In some cases, different combinations of the above various reasons may also be encountered, making the process of deleting files more complicated. This requires a different approach, flexible application of various utilities provided by Microsoft to solve. Attached: Windows XP delete AVI file problems Many friends may encounter the problem of unable to delete AVI files in Windows XP, which is mainly caused by the bug of Windows XP video preview function. You can try to delete it in the following way. Method 1: Enter “Regs-vr32/u Shmedia.dll” in the Run command box and press Enter to uninstall the video file preview function of Windows XP. When you want to restore the video preview function later, use the “Regsvr32Shmedia.dll” command to re-register. Method 2: Open the Command Prompt window, then end the Explorer process in the Task Manager, then switch from the Command Prompt window to the folder where the video file is saved, and delete the file with the Del command. Method 3: If a dual system is installed, it can be deleted from another system, such as Win vista.

The specific graphic solution 1. First, when the file is being used, the deletion will generally fail. At this time, you can use the file shredder in the Kingsoft Internet Security Vault. Add the target file or folder to the delete list of the file shredder


2. Or download and install unlocker, right click on a target file, select unlocker in the pop-up menu to unlock, then In the dialog box, select Unlock and delete.




3. If you suspect that the storage media is damaged, you need to repair the disk before you operate.

You only need to right click on the disk icon, select Disk to check the error in the Disk Properties dialog box, and follow the prompts to complete. After the storage failure is fixed, it will not be reported if it is deleted.

4. For the setting of the access rights of the folder, the result cannot be deleted, and this situation is easily overlooked. If the above methods fail. It is necessary to observe if the current user does not have full control of the folder. You need to right click on the folder icon, select Security in the pop-up menu, and add the current user or add everyone as full control.


Unable to delete file access denied phenomenon


People who use computers know that deletion is the basic operation of file management, almost no one will not delete files, simple Select the target and press del to achieve it. But sometimes, when netizens see strange files and want to delete them, they pop up a prompt: "Unable to delete file access denied"



Unable to delete file access denied Reason


1. The file is being used, the file is occupied, and the deletion will fail. You need to close or quit the program that is using the file, and then delete it.

2. If the NTFS file system is used, the deletion will fail if the current user does not have full control of the target file.




3. If there is a problem with the file storage, the deletion will also fail.

If the U disk is damaged, we can see this file in the Explorer, but we can't delete the file.

4. There are special characters in the file name that will cause the deletion to fail. Some users or software create such special files to protect valuable files from being inadvertently deleted.

Copyright © Windows knowledge All Rights Reserved