How to delete a directory that says it's not there?

TSx

Member
Feb 9, 2004
108
0
71
I've got a directory that every time I try to delete, it says "Cannot delete file: Cannot read from the source file or disk." I tried doing a new folder, same name, in that directory and it creates it fine, so it looks like I have two of the same...delete the dir to recycle bin no problem, however then it won't let me empty my recycle bin. I tried using another program that has a 'delete directly, do no go to recycle bin' option, however it gives the same error and won't let me delete it.

It was an ftp backup of my site and I'm thinking this happened because a change was made to the directory as I downloaded it...at least that's the only reasonable guess I've come up with. Anyone have any suggestions as to how to remove the directory?
 

GregANDTCH

Golden Member
Dec 10, 2000
1,370
0
76
It might have an incorrect path,
maybe running the quick scandisk to check files & folders will fix it so you can delete it.
 

TSx

Member
Feb 9, 2004
108
0
71
scheduled a disk check then restarted, after about an hour long scandisk/dskchk it came back with no errors, and I still can't get rid of the empty directory -=o\
 

nanaki333

Diamond Member
Sep 14, 2002
3,772
13
81
try deleting it from safe mode? or just with a command prompt? safe mode command prompt?
 

TSx

Member
Feb 9, 2004
108
0
71
I did forget to say, I am on Windows XP. The file was created on the admin account, and that's what I'm on now.

I tried restarting into safe mode, couldn't delete, tried safe mode command prompt, same thing...delete the dir, it asks y/n, I hit y, it goes down a line and I do a dir, it shows the same dirs still there...so I went inside multiple dirs to the one that's causing the problems and tried a del on it...it said cannot find file.

I also ran a full scandisk which took about an hour and 15 minutes, and found nothing.

I haven't tried knoppix yet, as I have never even heard of it so I've been reluctant to try it, but I'm out of other ideas.
 

GfW

Member
May 27, 2004
79
0
0
Knoppix is a Linux OS that boots completely from CD, nothing installed to your HD.
 

dclive

Elite Member
Oct 23, 2003
5,626
2
81
Originally posted by: TSx
I've got a directory that every time I try to delete, it says "Cannot delete file: Cannot read from the source file or disk." I tried doing a new folder, same name, in that directory and it creates it fine, so it looks like I have two of the same...delete the dir to recycle bin no problem, however then it won't let me empty my recycle bin. I tried using another program that has a 'delete directly, do no go to recycle bin' option, however it gives the same error and won't let me delete it.

It was an ftp backup of my site and I'm thinking this happened because a change was made to the directory as I downloaded it...at least that's the only reasonable guess I've come up with. Anyone have any suggestions as to how to remove the directory?


Try this:

DEL \\.\drive letter:\path\file name
For example:
DEL \\.\c:\somedir\aux

That's for a file. For a directory, try:

RD \\.\drive letter:\path\directory name
For example:
RD \\.\c:\somedir\aux