?
Solved

Cannot delete corrupted folder/directory

Posted on 2011-04-18
39
Medium Priority
?
556 Views
Last Modified: 2012-05-11
I have a corrupted folder that I'm trying to delete without any success. I receive the following error message: Cannot delete folder x: The directory is not empty
I've run both chkdsk f & chkdsk r and the problem still persists.

If anyone has any ideas, it would be much appreciated.


Thanks!
0
Comment
Question by:canu
  • 13
  • 11
  • 4
  • +6
39 Comments
 
LVL 17

Expert Comment

by:Sikhumbuzo Ntsada
ID: 35421546
If this is not a critical server, restart in safe mode and delete file.
0
 

Expert Comment

by:ams_group
ID: 35421549
Hi, Check there are no hidden or system files in the folder. Directory not empty usually means exactly that. Cheers
0
 
LVL 14

Expert Comment

by:Vinchenzo-the-Second
ID: 35421830
Try to remove the folder from a command window with the RD commaond with the /s
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 50

Expert Comment

by:dbrunton
ID: 35421899
Boot from a Linux CD and access the folder that way.   Check if empty and if it is then delete.
0
 
LVL 5

Expert Comment

by:RichardWltenburg
ID: 35421958
are there any . (dots) in the folder name or files in that folder?

can you give us more info is it a folder you created yourself?

try what vinchenzo said (also same solution when folder or file got a dot in it.)

rd /s "\\?\C:\Documents and Settings\User\Desktop\Annoying Folder."

0
 
LVL 93

Expert Comment

by:nobus
ID: 35422047
use unlocker :  http://www.filehippo.com/download_unlocker/      
0
 
LVL 5

Expert Comment

by:pinascode
ID: 35422255
you may need to go to properties on the folder and make yourself the owner under advanced security settings, owner. then you should be able to delete the folders and files.
0
 

Author Comment

by:canu
ID: 35423051
Thanks everyone for the quick response.

The name of the directory is found.001 so I guess that this was created after using chkdsk at some point.
I tried using rd to delete the folder but unfortunately, the message I received back was that the directory is not empty.

I will try and delete the file in Safe Mode and will let you know how I make out.
0
 
LVL 93

Expert Comment

by:nobus
ID: 35423317
unlocker is a small add-on, and will do it..
0
 
LVL 20

Expert Comment

by:Iain MacMillan
ID: 35423693
Agree with Nobus, i have used Unlocker several times on XP systems that refuse to let me delete empty folders.
0
 

Author Comment

by:canu
ID: 35423911
OK, I tried to delete the folder in safe mode and wasn't successful.

I've also changed the owner while in safe mode but couldn't delete the folder.

Unfortunately the page that I downloaded the unlocker program from has adware/spyware, plus the unlocker program has been identified as being adware/spyware so I won't be installing it.

Any other ideas?
0
 
LVL 50

Expert Comment

by:dbrunton
ID: 35424195
There are early versions of Unlocker that have adware in them.  Later versions don't.

Have you tried booting with a Live Linux CD yet and accessing the disk that way?
0
 
LVL 20

Expert Comment

by:Iain MacMillan
ID: 35424219
Unlocker can be downloaded from here and is safe - http://www.filehippo.com/download_unlocker/
0
 
LVL 5

Expert Comment

by:RichardWltenburg
ID: 35424822
what you can try first is take ownership of the folder...

check this website. someone with the same issue.

 http://discussions.virtualdr.com/archive/index.php/t-191125.html
0
 
LVL 93

Expert Comment

by:nobus
ID: 35425577
iannix - is that not the same link i posted?
and i can guarantee that unlocker is safe!
0
 
LVL 20

Expert Comment

by:Iain MacMillan
ID: 35425674
oops sorry Nobus, just posted the one i use from a good site I always have a tab open for.
0
 

Author Comment

by:canu
ID: 35426004
Hi again,

My anti virus/spyware program is definitely stating that Unlocker and the page that it is downloaded from is showing up as containing Spyware as shown by a screenshot so I won't download Unlocker or install it.

I will try changing the ownership of the folder again...
unlocker-malware-warning-190411.gif
0
 
LVL 93

Expert Comment

by:nobus
ID: 35426058
are you sure your system is not infected ?  the site does show no problems for me
0
 
LVL 50

Expert Comment

by:dbrunton
ID: 35426140
No problems for me as well.  Downloaded version 1.91 and scanned with Avast.  No problems found.

I have no problems with filehippo as I use it for many of my updates.
0
 

Author Comment

by:canu
ID: 35441878
My system isn't infected and I scan daily. Let me take another look at this Unlocker program again...
0
 

Author Comment

by:canu
ID: 35442036
OK, I downloaded Unlocker and installed it and unfortunately it wasn't able delete the folder.

Time for plan b!
0
 
LVL 93

Expert Comment

by:nobus
ID: 35442083
it was not able to delete it?  never had that; either your system is corrupt, or you have malware
you scanned with what?  only AV ?
then i suggest to use these both :
     Spybot :        http://www.download.com/3000-8022-10122137.html
http://www.malwarebytes.org/mbam.php                         MBAM
0
 

Author Comment

by:canu
ID: 35715371
Sorry to the delay, I've been away.

To answer your question, I scan the computer with Malwarebytes on a daily basis and it do not find any malware. The second thing to mention is that the computer has been acting very irratically in the last week or so, namely, it freezes up and regularly goes to scandisk after rebooting it even if I close it normally. I suspect that the hard drive has been corrupted which could explain some of the issues that I'm experiencing I guess.
0
 
LVL 5

Expert Comment

by:pinascode
ID: 35715780
backup and make sure you have a second harddrive ready to replace this one.
0
 
LVL 93

Expert Comment

by:nobus
ID: 35717880
then i suggest following scheme :
1 - run a diag on the disk, to be sure it is OK
2 - run also spybot, as suggested
3 - run sfc, or a repair install; if you post the OS, i can post guides

here all diags :  http://www.tacktech.com/display.cfm?ttid=287      
0
 

Author Comment

by:canu
ID: 35723239
Hi again, I ran a diagnostic check on the hard disk & ran Spybot and didn't have any problems reported. What is sfc or repair install? The operating system is Windows XP MCE.
0
 
LVL 93

Accepted Solution

by:
nobus earned 1500 total points
ID: 35726415
look here :
http://www.updatexp.com/scannow-sfc.html                        SFC use in XP
http://www.michaelstevenstech.com/XPrepairinstall.htm            Repair install  XP
0
 

Author Comment

by:canu
ID: 35770931
Thanks, I'll get to it ASAP
0
 

Author Comment

by:canu
ID: 35780920
First of all, thanks for the suggestions.

I've taken a closer look at both of the solutions and unfortunately I've hit another hurdle namely, they both depend on the original Windows XP CDs being available which unfortunately, they're not.
I was a good way through using the sfc program when a pop up window appeared with the Windows File Protection message that the files that are required for Windows to run properly must be copied to the DLL Cache. I think that I would be able to find the recovery disks though, would this be likely to have the original I386 folder?
0
 
LVL 5

Expert Comment

by:pinascode
ID: 35781219
normally any oem disc should do
0
 
LVL 93

Expert Comment

by:nobus
ID: 35783475
many PC's have the folder somewhere - or inthe restore partition
0
 
LVL 20

Expert Comment

by:Iain MacMillan
ID: 35793374
oem installs usually have the i386 folder somewhere.

if you check the registry under HKEY_LM, Software, Microsoft, Windows NT, CurrentVersion and see what is listed under SourcePath - if it points to the CD drive, then you would be pretty much stuck without an OEM disk.  You could see if you have any other systems the same that may have an i386 folder you could copy over to complete the repair (same SP level).
0
 

Author Comment

by:canu
ID: 35897017
Hi, I'm afraid my hard drive has died so I won't be able to test your solutions.....
0
 
LVL 93

Expert Comment

by:nobus
ID: 35899901
was it very old?  RIP..
0
 

Author Comment

by:canu
ID: 35938060
Hi, it was coming up to 5 years old.

Thanks a million for all of your help!
0
 
LVL 93

Expert Comment

by:nobus
ID: 35940071
don't thank a million -  close the question and assign points...lol
0
 

Author Comment

by:canu
ID: 35969706
I like someone with a sense of humour....Let me see what I can do!
0
 

Author Closing Comment

by:canu
ID: 35969719
My hard drive died during the course of this case so I never got to the bottom of this unfortunately!
0
 
LVL 93

Expert Comment

by:nobus
ID: 35972075
too bad; but at least you know what to do in case it happens again
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question