Solved

Remove directory no matter what

Posted on 2004-10-13
2
154 Views
Last Modified: 2010-04-14
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.

Thanks,
Jeff
0
Comment
Question by:jeffmace
  • 2
2 Comments
 
LVL 57

Accepted Solution

by:
Pete Long earned 500 total points
ID: 12301397
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
http://support.microsoft.com/default.aspx?scid=kb;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 (filena~1.xxx)
Take note of the name and type "del filena~1.xxx" {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
http://helpdesk.kixtart.org/KixUtilsTasks.asp
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 http://www.sysinternals.com/ntw2k/freeware/ntfsdospro.shtml you can boot to DOS mount the
NTFS volumes and delete it from there.
**********

**Other Options**
Use this on the file/folder in question
http://www.jrtwine.com/Products/DelFXPFiles/

Use GiPo@MoveOnBoot
http://www.gibinsoft.net/gipoutils/bin/moveonb.exe
Instructions for use http://www.download-free-games.com/removing_dm_exe.htm

Try using "KillBox" on the file
http://www.broadbandmedic.com/download/VbStuff/TheKillBox.zip

Try using TAKEOWN from the resource kit to force ownership and delete the file
http://www.dynawell.com/support/ResKit/win2k.asp

"Access Denied" When You Delete Folders from a Mounted Drive
http://support.microsoft.com/default.aspx?scid=kb;en-us;243514
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 12840017
ThanQ
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now