Remove directory no matter what

Some how my webserver was hacked and someone upload 15 gigs of files (mostly crap) and I have deleted just about everything by using the shot name method and RD /Q/S.  But there are still a few directorys that go on and on and it won't let me delete.  It tells me that it can not find the file or path specified.  The folder size is '0' and all it is, is a bunch of folders.  Does anyone have any way to just delete the folder regardless of the permissions, etc.  I just want to get rid of it.

Who is Participating?
Pete LongConnect With a Mentor Technical ConsultantCommented:
Can’t Delete a File/folder

You need permissions to delete a file are you a member of the Administrators group?
(you need a minimum of {modify} to delete.
1.      Try to take ownership of the file. Right click the file > Select the security Tab
Select properties > Select Advanced > Select Owner
Find the User or group you wish to give ownership to and select > Click apply
Now try and delete the file;en-us;268019
2      Is it telling you the filename is too long? Then Delete the file in DOS mode
Start >Run >cmd {enter}
Navigate to the folder the file is in, i.e. if its in c:\folder\anotherfolder\file, type "cd c:\folder\anotherfolder" {enter} The command prompt should change to let you know you are in
the correct directory. Type "dir /x" {enter}
The offending file will be listed like (
Take note of the name and type "del" {enter}
3.      Is the file flagged as ‘System’? Start > Run > type CMD >Click OK
Navigate to the folder in which the file resides (i.e. cd c:\folder\folder\ {enter})
Type attrib -r -s -a -h filename.extension {enter}
Del filename.extension {enter}
4.      Is the file in use? If either the OS or another program is using the file you cannot
delete it You can with ZAP Included with the Microsoft SMS 2.0 Resource Guide and the
Microsoft BackOffice Resource Kit 4.5. or you can download it here
WARNING make sure you know what your deleting first!
5.      If your hard drive is formatted with FAT32 you can boot with a boot disk and Delete
the file from DOS. (del filename.extension) If your hard drive is formatted with NTFS you
can boot with a boot disk and, if you lucky enough to have a copy of NTFSPro from you can boot to DOS mount the
NTFS volumes and delete it from there.

**Other Options**
Use this on the file/folder in question

Use GiPo@MoveOnBoot
Instructions for use

Try using "KillBox" on the file

Try using TAKEOWN from the resource kit to force ownership and delete the file

"Access Denied" When You Delete Folders from a Mounted Drive;en-us;243514
Pete LongTechnical ConsultantCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.