I have a folder without any file in it in my external hard. I am able to rename it, but not able to delete it. I ran CMD utility as an administrator and I tried the commands "del foldername", "rd foldername", "deltree foldername" (the last one was not allowed in Windows XP). They give me the message "Access is denied." for "rd foldername". How can I delete it?
Asked
Active
Viewed 1,728 times
2 Answers
1
I am not cmd guru, but simple as 1-2-3 is delete folder using system account.
at 11:11pm /interactive cmd
Now if system command appear, delete folder:
del foldername

Xearinox
- 3,224
- 2
- 24
- 38
-1
try
attrib /s foldername
This should show you the directory attributes.
If the response is
R x:\dirname
then the directory is "read-only". In that case, execute
attrib -r foldername
and you should then be able to rd
it.
It may be that the directory has (possibly hidden, possibly read-only) contents. The attrib /s
should show these to you.

Magoo
- 77,302
- 8
- 62
- 84
-
Thanks! I tried attrib foldername, and it showed SHR x:\dirname. I also tried attrib foldername -s -h, but it showed "Access is denied" again. I also tried attrib /s foldername, but it respond to me "File not found". What should I do now? – user3093982 Dec 29 '13 at 17:22
-
This is a read only hidden system file and I tried "attrib -r -h -s foldername" and "attrib -h -s foldername", but they didn't work. It shows "Access is denied." – user3093982 Dec 29 '13 at 17:27
-
You dont have permissions. Thats all. No matter if folder is read only or not. – Xearinox Dec 29 '13 at 19:13
-
Thank you for your comment, but what's the reason and how can I solve the problem? – user3093982 Dec 29 '13 at 19:39
-
Simple answer: Malware. – Xearinox Dec 29 '13 at 20:11