Discussion Locked

undeletable folder

0 helpful
53 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am running Win 2003 on 2 servers in a high school situation with WIn XP SP2 clients. I have 4 student users i cannot delete because their home directories each have a folder that i cannot remove. It is buried about 6 subfolders down in their MySettings folder. I have made sure the path name is not too long, i have successfully written a text file into the folder and subsequently deleted it. I cannot rename the folder itself nor move it. Anyone seen this before and can help out? Thanks

53 replies

by hal 9000

Try Booting in [b]Safe Mode[/b] and you should be able to remove the folders then. If you can't there is something in whatever you are using Active Directory of Group Policies that is preventing the removal of these folders.

Col

by jcdshs

Gee - unacceptable? No, it was a good suggestion but unfortunately it didn't give me the solution. Maybe the choices for rating should be worded differently. I feel really bad rating someone's response as unaccepatable.

by anuj doshi

Check whether the folder name contains some hidden character like "alt+255" (alt key + numpad 255).

by zimonar

To delete the undeletable folder; open the folder and delete all include the folder. Then delete the empty folder.

by jcdshs

thanks for the three responses.
1)tried the "safe mode" boot last night but no joy.
2)the "hidden character" doesn't make the folder undeletable, but thanks for the suggestion.
3)have deleted all contents of folder but the folder itself just won't go. thanks for trying

by mark.booker

Have you taken ownership of the folder? If not you might try a utility like hijackthis under its misc. tools is an option to delete on reboot I believe. Isnt the best option for sure but may work.

by andyw360

I might be able to help here, I had a stubborn folder that would not delete on a Windows 2000 server yesterday, I used the following program which deleted the folder straight away and also without a restart, give it try.

Link : http://www.snapfiles.com/get/Unlocker.html

Hope that helps.

Large

by jandrews

Sounds like a permissions issue to you have rights to this folder? if not you could try taking ownership of the folder as mentioned by someone else.

by Member 31076378

I have had this smae problem a number of times. I don't know the specific technical reason for it. But here is what has always worked for me.

Either:

1. Try deleting each file within the folder first, starting with the file that is the farthest down the chain. Then the main folder, after you have delted all the files and sub folders. It appears you may already have tried that...so on to the next.

2. If the above doesn't work, try "moving" the folder to another directory on your hard drive. Right click of course and then scroll down to "cut" and the "paste the folder into a "temp" folder. If that works then attempt to delete it.
You may still have to drill down to the last file first to delete the folder.

by larry.gerlt

Have you tried taking ownership of the folder?
Right click folder,select properties,select advanced button, select ownership tab.

by floyd.temeyer

As Administrator take ownership of that folder, then it can be deleted. I now create the folders before I create a new user so my Administrator account is the owner. I can then give them the permissions they need. If it is created by the system when the new user logs on they are the owner and Administrator has no rights.

by lastchip

If you're desperate, one of the best tools I've found for this situation is Bart's PE http://www.nu2.nu/pebuilder/

Download and burn yourself a CD. You'll find you use it often once you've tried it.

At a suitable time, re-boot the server with the CD and use the file management utility to remove the required file(s). Bart's PE is great for removing infested files - something that I've used it for on numerous occasions and repairing broken hives as well.

by thom_stewart

Have you tried from the XP client to remove the user account and all folders/files, then reboot client, with network cable unplugged, make sure their account is gone from the client. (If need be do this in safe mode, and del what ever is left of the account) then remove the account from the server, reboot server and del whats left.

I had a similar problem here, the account could not be removed from the server if the client had an *active* account.

hope this helps, if not let me know what you find as the solution, just in case this happens here again.

by mwrmwr

Happens a lot! So far, I have always won ...eventually.
You may have problems only on the server or perhaps with the profiles on the XP workstations.
{use workstation\user on the workstations particularly under docs&settings and domain\user on the server in scenarios below...}

Key tricks:
#0 Make sure you have a good understanding of user settings and group memberships on the PCs and server-domain(s) and that they are 'sensible" e.g. administrator or the privileged user you are logged in as has all the capabilities for deletion and modification.

#1 Change OWNER and inherit down with replacement
n.b. domain\Administrators vs domain\Administrator

iirc, 'Administrators' seems to work better and that sort of made sense but was counter-intuitive to me.

#2 Reboot and try again if stubbornness persists

#3 remove inherited permissions and tidy up permission sets inherited down the hierarchy
{this may involve you in amending other branches you didn't want to, so take care that those requirements are re-established a.s.a.p.) ensure inheritance down to all sub-nodes.

#4 remove all subfiles (tediously) from branches upwards. XP/2K3 often reports failure to delete at a higher level but after pruning and coming up to the top of the branch for deletion it is simply accepted (a M$oft bug as far as I'm concerned}

#5 in case of stubbornness, I often empty the recycle bin and defrag and disk check and then try all other tricks again.

The worst thing I used to get on 2003 server was that I tried amending inherited permissions at (say) a user-directory root and it churned away for 20 minutes before claiming there was insufficient disk space left - though there were many gigabytes left on each drive. Again, some M$oft bug at least w.r.t. the displayed error message. Changing ownership at lower levels and applying above techniques seemed to work.
#7 Minimize to the essential set the permissions and apply to groups rather than individuals who have dabbled ove

by pmidnite

Make sure your folder options, VIEW is set to "show hidden files and folders". Also, make sure there are no programs running in the background that my be using something in those folders.

by jckrueger

It is possible that even as an administrator you do not have full privleges to that folder. Check the security tab and make sure you have full rights and make yourself the 'owner' also. That should allow you to delete the object.

by lcave

I have seen this in Server 2000. I'm not sure if it works the same as 2003. I take ownership of the folder (under advanced permissions). Once I have ownership of the folder, I delete all the subfolders first, then the offending folders. Hope this helps.

by jcdshs

Great find.
Am on hols at the moment so can't follow this hrouhg immediately but this sounds exactly like my problem - kids uploading games onto the server and using these ftp tricks to try and keep them there.
Well done to ou and veryone who has contributed - you guys are GREAT!!!

by jamierterrell

Go to the the cmd prompt in the directorys you are having the problem in and type in "del /f/p *" and see if that helps out. If a file or directory has a name with strange charcters you cannot delete it sometimes. Had this problem a while back and I hope I remembered the correct command.

by norris

DOS still works. From the command prompt navigate to the folders and see the true folder name. Strip off all the attributes and see if you can delete that way.

by ochimo

Right click the folder and bring up the properties. Go to the security tab and then click advanced. Select the "owner tab" and make the administrator or the administrators group the owner. Make sure you select the subcontainers as well. I find this usually gives me back control and then I can delete the folder.

by frank.e.myers

I do not know exactly what you have tried but your problem description fits exactly what I had experienced earlier this year dealing with a user?s profile on the server. After double checking all your permissions are correct, start to look up the directory ladder at folder names. More then likely you will find one with a long name. Rename that folder name and then go to back to the folder that you wanted to delete and you will be able to. Yes, this sounds strange because other folders and content deleted fine except for one. I must say that if I had not seen this myself it would be hard to believe. I hope this helps.

by nrichards1371

Did you try taking ownership of the folder and then giving yourself the modify or full control permission? I didn't read all of the responses so I'm not sure if this has been suggested prior to my post.

by chriscol9

To enable removal of an empty folder, try creating a dummy folder on the desktop with the same name as your target. Drag the new folder to the folder holding your target, and let Windows replace any files with matching.

I think this is perhaps a quick way to take ownership of your target. It works quite well if you can move the target folder but not delete it or rename it.

Hmm... If you couldn't delete files inside the folder, what might happen if you also created dummy files inside your folder with notepad and renamed them to match the files inside the folder before copying your dummy folder over the real one???

by mr.rubbish

Not an answer but I would just like to say how incredibly useful this thread was. Having frequently knocked heads with files/folders that were more harder to shift than the most stubborn stains I have gleaned 2 utilities that will be forever added to my toolbox. These are:
Unlocker (Answer 6) and Process explorer (Answer 4 (followed it to this link:- http://www.sysinternals.com/Utilities/ProcessExplorer.html )
I should think those 2 programs could solve 99% of instances of these undeletable files.

by sooze98148

I'm also chiming in with kudos to all the answers.

Five minutes after sending the link to a co-worker (he mostly does Windows desktops and servers), the Unix guy came over to ask for help in deleting "in use" files from a user's Windows desktop.

I'm not kidding, FIVE MINUTES!

We downloaded and installed Unlocker (answer 6) and recalcitrant files were deleted. We're all adding Unlocker to our Jump Drives . . . and I'm bookmarking this link.

by 0 badmonkey 0

Either drop to a command prompt or boot to command prompt depending if using a CMD window doesnt work.

Type in dir /x to get the correct folder name
Type in rmdir foldername (or rmdir /s foldername, depending (check usage))

This is what I had to go to get rid of a folder doing the same thing on an XP box.

by coofamp

I use for this a tinny program "Unlocker 1.8.3.exe" from ccolomb.fr with success.
Pieter

by kylew

Try replacing NTFS permissions on the folder with only you and overwrite the author so it's you. This will allow for you to take over the folder and should allow for deletion. If this doesn't work then look into where the folder connects if there is a home directory or something and destroy the link.

by klabenda

I have the same problem at home with Windows XP SP2 Home Edition.
Boot the PC. Open File Explorer and reach the folder and erase it. This has to be done very, very fast. If you don't do it fast enough something happens that the folder can't be deleted.
Not a very tech procedure but it works.

by r.ermel

I found a good tool for problems like this.
Just try if it works at yours too.
Here is a desription from the readme file

Unlocker for Windows 2000 and Windows XP
Copyright (C) 2005 Cedrick Collomb
ccollomb.free.fr

Using Unlocker
--------------

How often have you tried to delete or rename a file or folder and got
"Cannot delete xxx: It is being used by another person or program." ?

Unlocker is a tool which will help you removing this scandaleous Windows bug.

Simply right click the file or folder and select Unlocker. If the file
or folder is locked then a window will appear with a list of processes locking the file or folder. Select the locks and click Unlock and you are done.

It is recommended to Unlock wisely and to close open processes locking files or folder if any, but if only Explorer.exe is the culprit, do not
hesitate ! :D

by dm

You can shutdown the servers and remove the hard drive and hook it up as a slave on another system. Then you will be able to remove the folders running them as a slave on another system. The folders are being used and that is why you can not remove them. I would say there is something in the registry or security still using them when the server is running. Try searching in these areas and edit out any reference to these old folders. I would not worry about them. You have removed the entire contents of these folders. Therefore they are not doing any harm or taking up any space. I hope this helps! Be very careful editing the registry and security!

Good Luck!
David

by mrtommo

- Check the permissions of the folder and if your user account does not have full permission then add it.

- Try booting the machine to command prompt and use the ATTRIB command with appropriate switches to remove attributes and then delete the folders with the DEL or DELTREE commands using appropriate switches.

by will962

I have had success by ensuring 'System' is removed from the permissions. Leave only the 'Administrators' group with full rights (and ownership).

by ken

If you've worked through the rights issues, try this:

run cmd
cd \parent of bad directory
dir /w (will show you the 8.* short name of the folder you want to delet)
rd shortname

assumes the folder is otherwise empty

by rfojaghi

Hi
You can use Windows PE to boot your PC and then delete it by PE Explorer.
hope to be happy

by f.kolovos

I had the same problem for a company I used to work, but not with user profiles, but with folders owned by other users.

As I understand, as the administrator you cannot delete, nor rename the users' folders. However, as far as this may sound strange, it is because you are not the owner of these folders and you are also not included in their permissions list (even though you are the administrator).

However, since the administrator can do ANYTHING, you are simply going to TAKE THE OWNERSHIP of these folders. Go to these folders and open their permissions tab. From there go to advanced and you'll see a tab concerning ownership. When you go there you will see who are the current owners. You can change them to be the administrator from the list there and then by clicking on the CHANGE OWNERSHIP button.

From that point on you will be able to do whatever you wish with these folders.

P.S.
If you did not find the ownership tab in the place that I refer to above, simply search your way around there (in the permissions area) and you will find it.

Hope that I've helped you.

-Fk

--
Filippos N Kolovos

Software Systems Analyst & Engineer
M.Sc. (Eng.) in Data Communications

Automation & Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: f.kolovos@ieee.org,
----------------------------------------------

by pcmystro

Have you attempted to take ownership of the folder as Administrator and then force Full Control permissions for the Administrator? Are you using the Administrator Account or the account of the user/student that owned the folder?

by dafleck

Have you tried Command Mode (DOS)? I've had many a directory/file that was undeletable by normal methods that I was able to delete using DOS commands.

by pharos

You may have some sort of running process that is preventing you from renaming the folder. An old trick to get by this is to rename the folder from the command prompt, which allows renaming of a file or folder, even if it is in use. Reboot, and you should be able to delete the renamed folder. Caution: if it is part of a running process, you may get error statements on reboot.
Good Luck!!

by louisn

Right-click the home folder
Select Sharing and Security
Click the Security tab
Click Advanced
Click the Owner tab
Make the Administrator the owner of the folder
NB: put a tick next to "Replace owner on subcontainers and objects.
Click Apply and OK.
After Windows has done its thing, exit and try and delete the folder again - you should now be successful.
If not, make sure your ant-virus as well as anti-spyware is up to date and do a check - I'd do that in any case.

Hope this helps.

Regards,

Louis

This discussion is closed to new replies.