This article describes why you may not be able to delete a file or a folder on an NTFS file system volume and how to address the different causes to resolve this issue.
Cause 1: The file uses an ACL
You may not be able to delete a file if the file uses an Access Control List (ACL). To resolve this issue, change the permissions on the file. You may have to take ownership of the files to be able to change the permissions.
Administrators have the implicit ability to take ownership of any file even if they have not been explicitly granted any permission to the file. File owners have the implicit ability to modify file permissions even if they are not explicitly granted any permissions to the file. Therefore, you may have to take ownership of a file, give yourself permissions to delete the file, and then delete the file.
Cause 2: The file is being used
You may not be able to delete if the file is being used. To resolve this issue, determine the process that has the open handle, and then close that process.
Depending on how the file is opened (for example, it is open for exclusive access instead of shared access), you may not be able to delete that is in use. You can use a variety of tools to help you determine the processes that have open handles to files whenever you want. For more information about tools to help the processes that have open handles to files,
Cause 3: File system corruption is preventing access to the file
You may not be able to delete the file if the system is corrupted. To resolve this issue, run the Chkdsk utility on the disk volume to correct any errors.
Bad sectors on the disk, other faulty hardware, or software bugs can corrupt the file system and put files in a problematic state. Typical operations may fail in a variety of ways. When the file system detects corruption, it logs an event to the event log and you typically receive a message that prompts you to run Chkdsk. Depending on the nature of the corruption, Chkdsk may or may not be able to recover file data; however, Chkdsk returns the file system to an internally consistent state. For additional information about using the Chkdsk utility,
Cause 4: The file name includes a reserved name in the Win32 name space
If the file name includes a reserved name (for example, "lpt1") in the Win32 name space, you may not be able to delete the file. To resolve this issue, use a non-Win32 program to rename the file. You can use a POSIX tool or any other tool that uses the appropriate internal syntax to use the file.
Cause 5: The file name includes an invalid name in the Win32 name space
You may not be able to delete a file if the file name includes an invalid name (for example, the file name has a trailing space or a trailing period or the file name is made up of a space only). To resolve this issue, use a tool that uses the appropriate internal syntax to delete the file. You can use the "\\?\" syntax with some tools to operate on these files, for example:
del "\\?\c:\path_to_file_that contains a trailing space.txt "
For more information Log on :- http://CannotDeleteFile.net.
Loading...