Removing a stubborn folder

G

Guest

I have a folder on my C drive that has nothing in it; however, I can not
delete the folder. I have tried reseting the attributes, dropping down to
DOS and trying the 'rd/s/q/<folder name>. Nothing works. I have also tried
changing the name of the folder, but an error msg keeps popping up that
states, 'Cannot delete file:cannot read from source file or disk.' I should
mention that when I do a *. at the DOS prompt, DOS also sees the folder, but
again I am unable to rename the folder. Can someone tell me what is
happening or what I need to do to eradicate this thing?

Dizzy
 
W

Wesley Vogel

Is the folder name a secret?

Cannot delete file Cannot read from the source file or disk

You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/kb/320081

How to Remove Files with Reserved Names in Windows XP
http://support.microsoft.com/kb/315226

To delete a folder.

RD is the RemoveDirectory command. Removes (that is, deletes) a directory
or folder.

Dragging the folder into the command prompt automatically types the path &
folder name and adds the double quotes.

\\?\ turns off some checking of illegal names as a side effect of allowing
paths up to 32000 characters.

Open a command prompt...
Start | Run | Type: cmd | Click OK |
In the command prompt window type:

RD "\\?\

Drag the folder into the command prompt so you do not have to type the name
and path.

Click on the command prompt Title bar to give it focus.

Make sure that there are NOT three double quotes, only two, like...

C:\>RD "\\?\%userprofile%\Desktop\New Folder"

Then hit your Enter key.


Try this to delete the file.

Open a command prompt...
Start | Run | Type: cmd | Click OK |
In the command prompt window type:

del (and one space)

Drag the file into the command prompt.

Then hit your Enter key.

del is the delete command. Deletes specified files.

Dragging the file into the command prompt automatically types the path &
file name and adds the double quotes.

One space is needed between del and the path\file name, like...

del "%userprofile%\Desktop\New.txt"

\\?\ turns off some checking of illegal names as a side effect of allowing
paths up to 32000 characters.

Open a command prompt and type:

del "\\?\

Drag the file into the command prompt so you do not have to type the name
and path.

Click on the command prompt Title bar to give it focus.

Make sure that there are NOT three double quotes, only two, like...

C:\>del "\\?\%userprofile%\Desktop\New.txt"

Then hit your Enter key.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top