Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder a 2003 member server which can't be deleted. Nothing has any permissions (domain admin and running up a cmd prompt as "nt authority\system" using psexec) - always "access denied".

When I do a dir /q, the owner shows as "...".

I've tried takeown.exe on the folder and also it's parent. The bad folder always reports "access denied". Also tried to reset using icacls, same thing.

Explorer permissions has no sharing & security options or tabs. It works fine for other folders, even in the same directory.

share|improve this question
up vote 9 down vote accepted

I've seen something similar to this. What ended up being the case is that the file was deleted while there were still outstanding locks on it. I couldn't do a darned thing to it. Clearing the outstanding locks caused the file to fully delete.

share|improve this answer
+1 - Absolutely could be that, as well. The OP should run something like SysInternals "handle.exe" and grep the output for references to the "undeletable" directory. – Evan Anderson Jun 9 '10 at 21:18
Just been back to check and run handle and it's now gone! Can only presume something was holding it, which has eventually closed and allowed the folder to delete. – winnt93 Jun 9 '10 at 21:40

I'd run CHKDSK on the volume before I did anything else. Are you seeing any messages in the System Event Log re: filesystem corruption (source "NTFS")?

share|improve this answer

For deleting such files I first try unlocker. If that fails, or if there is some other operation I wish to perform on the file, I use my Bart PE disc.

share|improve this answer

Had the same issue but no files had a lock on it, it just managed to lose all of it's owners.

Solution was to use TakeOwn

takeown /F dirname

Will take ownership of the file to the current user. Use /A after the dirname to assign it to the system administrator.

share|improve this answer

You can use rd - rmdir which is removedirectory or delete folders,

You can use the following:

rd /s "\\?\C:\foldername\nextfolder\foldertodelete"

The /s parameter is to removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree. So, it will most likely delete it.

I have tried it before more than once.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.