Can some please let me know how i remove or delete directories that you can delete in Windows or Dos. I was hacked and i have long strings of directories that can't be deleted.
Printable View
Can some please let me know how i remove or delete directories that you can delete in Windows or Dos. I was hacked and i have long strings of directories that can't be deleted.
What version of Windows? DOS should allow you to delete the directory. You can use wildcards if need be or put the directory name inbetween " " to take care of things like spaces.
Been a while since I've done it on command line (spending too much time in Linux) but I believe del * would delete all directories.
yup .. MsMittens right. if you want to delete the files in command prompt ( DOS ) C:/del *.* will delete all your files ( example : "C:/mydocu~1/del *.*" ) . i am sure it will delete your files.
as long as i know about how to delete in windows with "shift+delete" ( if you don't want the files move to the ricycle bin ) or just push "delete" button. but if it didn't work .. i dunno what else to do mate.
:)
or you can just go into DOS and type rmdir directoryhere
As you are asking about deleting directories and not files I wanted to add to what was said above. My understanding of your question is that you have many directories with extremely long names and when you try to delete them in Windows Explorer you get some kind of error message. Depending on the cirmcumstances and how many directories we are talking about here are two suggestions:Quote:
Can some please let me know how i remove or delete directories that you can delete in Windows or Dos. I was hacked and i have long strings of directories that can't be deleted.
1) From Windows Explorer try right clicking on said directory and renaming it before deleting. If you can rename it you should be able to delete it.
2) Open a DOS window or reboot to a command prompt. In DOS filenames have to adhere to the 8.3 format meaning that a directory named directory would be called direct~1 or something like that. From a dos prompt use the deltree command to delete the entire directory.
ex:
from a c:\ prompt type deltree direct~1
Afterwords if you have not already done so I would run a current anti virus scanner on the system to be safe.
Good Luck
if it won't let you delete the directory because they are restricted names use the following syntax that avoids the reserved name checking:
from the c:> prompt
rd \\.\<dir-name> where dir-name is the name of the directory you want to remove such as con or lpt1 etc.
Just to correct erok, rmdir only works on empty directories (no files)
The proper command is "deltree *directory*" for directories with content inside.
It may be that the directories are attribed.
If you know the name of the directory (in short for dos ie: direc~1), go to the parent directory (ie: if it's in mydocu~1\...) and type the following:
attrib -a -r -s -h *directory*
Attrib hides and protects files on a computer that have an importance from deletion. Give that a try if you must.
Add: use this little program called d.exe. It's like using dir but it's color coded (ie: directories are blue, files are green and hidden files are orange) and allows you to see all the hidden files in Dos. (with a * at the end)
Thanks for your reply guys, but this is not a dummy directory issue, its a well known hack, i know Dos like the back of my hand so that doesn't work. the server was hacked and several directories where created most like using dos ascii characters that are had to define such as ALT+5844 etc.... if this helps.
First you'll need to get an ascii table with all the alt+key shortcuts
Next, if you are using a windows version before win2k/xp you can go to command prompt and do:
deltree (first ascii character)*
If using windows 2k or xp you can use:
rmdir (first ascii character)* /s
Use the alt+# configuration for the (first acsii character) above.
enjoy
I understand your problem ( I had the same problem ). If all else fails you need to get the POSIX stuff from the resource kit ( I think that is where I found it ). That will allow you to delete the files and folders from your system. If you have trouble finding the POSIX stuff let me know and I will help you find it.
Here's couple MS Knowledge Base links about those undeleteable files/directories..
For XP, 2000 & 2003 servers
http://support.microsoft.com/default...b;en-us;320081
For NT 4 -family
http://support.microsoft.com/default...b;en-us;201129
And for (old) NT 3.1
http://support.microsoft.com/default...;EN-US;Q101654
And here's some docs how they create them on DOS: http://www.astalavista.com/library/os/win95-98/
Below is a direct answer to your question.
http://securityadmin.info/faq.htm#ftpfolder
In fact, a good source of lots of good security "how tos" is
http://securityadmin.info/faq.htm
That reallyh help GandalfTheGray, although i was able to delete all except one which i think i need posix rm.exe for, does anyone know where i can download one seems to be for sale.
I'm still having problems removing two folders even with the posix tool and etc...
this one has a com2 at the end
here is the directory structure
C:\Inetpub\bad\_vti_log\.sys\COM-K-6º+M•\ COM¦¬ï•\com2
I posted this once before but it took me a while to find it. This link may give you a few ideas on how to remove those files.
How to Remove Files with Reserved Names in Windows
Good Luck
Cheers: