2

I have a directory that I want to delete, but windows (xp home sp3) is giving me the run-around and the folder is now effectively indestructible.

Attempts to open the folder, either via explorer or cmd.exe are met with 'd:/temp/foo Is Not Accessible. Access is denied'.

Attempts to delete the folder result in 'Cannot delete foo: The directory is not empty'

So I can't delete it because supposedly it's not empty, but windows won't let me in it for some reason, so I can't clean it out first. There's nothing in it of consequence, and basically I just want to delete it at this point.

Thinking that some other process must have a lock on it, I used the SysInternals 'handles' and Process Explorer to look for open handles with the directory name. These turned up no matches. (The directory name is not actually 'foo', it is something more unique but 'foo' is easier to type here).

I put the machine through a restart, and the problem persists. I did a search for the folder name with regedit, to see what other apps might be aware of it. No match.

The properties dialog was mildly interesting. The Read-Only attribute is 'semi-checked', i.e., the grayish check mark you get when some parts are and some parts aren't. Naturally I immediately unchecked this, and tried to delete the folder. No go. Opening properties again reveals the gray check mark next to Read-Only has returned. All the stats, size, size on disk, files, folders, all these are zero. There do not appear to be any shares on the folder, so that's not it either.

Finally, I tried opening the partition's properties, and running the Tools/Error Checking utility. This didn't turn up any problems either.

Fwiw, this directory was created by [a popular gui zip tool] when I tried to unpack a tar-and-zipped archive created on another system with command line utils. The archive was definitely corrupt, but I've never seen such a file do anything worse than crash the zip app, and certainly never leave permanent glitches in the file system.

So what else can possibly be going on to make this folder behave this way?

1
  • 1
    I still don't understand what exactly is wrong, but in case anyone else gets stuck, here's an interesting thing to try: "cacls problemfilename /G userid:F"
    – JustJeff
    Apr 29, 2010 at 3:40

4 Answers 4

5

I could also be security. Right click the subdirectory, go to Properties, then Security. What users/groups have rights to the subdirectory? Try and add Everyone and give all rights, then save and see if you can open the subdirectory. If you can, try and delete it.

1
  • 1
    It was indeed security. XP home doesn't have the Properties/Security tab, but further digging for XP security settings (after reading this answer) led to the 'access control list' utility, cacls.exe, which solved the problem, so you get the accept. Btw, turns out cacls can be used in XP home w/o having to reboot to safe mode.
    – JustJeff
    May 1, 2010 at 3:38
2

It's definitely a security issue. Have you try booting into safe mode to try to delete it?

I have used Unlocker, to delete this before but it might not work for you. Just try it for me.

attrib command should be able to let you set permission on that folder.

2
  • I agree, since you are on Home and can't get into the security tab, try using Unlocker first.
    – James Watt
    Apr 29, 2010 at 4:10
  • yeah, tried safe mode reboot. got the same symptoms there, too.
    – JustJeff
    Apr 29, 2010 at 4:22
1

Justjeff,

Start Windows XP Home Edition in safe mode If you are running Windows XP Home Edition, you must start the computer in safe mode, and then log on with an account that has administrative rights in order to access the Security tab. Access to the Security tab is required in order to change security permission. If you are running Windows XP Professional, you do not have to start the computer in safe mode. For more information about how to start Windows XP in safe mode, click the following article number to view the article in the Microsoft Knowledge Base:

http://support.microsoft.com/kb/308421

1
  • i did reboot in safe mode, but didn't think to check for the security tab there. anyway, it was a learning experience. found this cacls.exe tool that lets you mess with security settings from cmd.exe
    – JustJeff
    Apr 29, 2010 at 4:23
0

As a side note as well, this is a reason I have a linux live cd on a flash drive on me at all times. In a worst case scenario you can load that up and look at the hdd from there. Linux would just ignore all the security settings and generally let you delete anything.

1
  • I do the same thing with DOS.
    – Synetech
    Apr 29, 2010 at 16:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .