How do i remove directories that can't be deleted
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How do i remove directories that can't be deleted

  1. #1
    Junior Member
    Join Date
    Sep 2001
    Posts
    7

    How do i remove directories that can't be deleted

    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.

  2. #2
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,324
    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.
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  3. #3
    Senior Member
    Join Date
    Feb 2003
    Posts
    211
    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.

    When I lay me down to sleep, Pray the LORD my soul to keep.
    If I die before i wake, Pray the LORD my soul to take.

    http://www.AntiOnline.com/sig.php?imageid=389

  4. #4
    er0k
    Guest
    or you can just go into DOS and type rmdir directoryhere

  5. #5
    Junior Member
    Join Date
    Sep 2002
    Posts
    24
    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.
    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:

    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

  6. #6
    AO Ancient: Team Leader
    Join Date
    Oct 2002
    Posts
    5,197
    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.
    Don\'t SYN us.... We\'ll SYN you.....
    \"A nation that draws too broad a difference between its scholars and its warriors will have its thinking done by cowards, and its fighting done by fools.\" - Thucydides

  7. #7
    Banned
    Join Date
    Mar 2002
    Posts
    968
    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)

  8. #8
    Junior Member
    Join Date
    Sep 2001
    Posts
    7
    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.

  9. #9
    Member
    Join Date
    Feb 2003
    Posts
    96
    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
    ][ neta1o ][

  10. #10
    Shadow Programmer mmelby's Avatar
    Join Date
    Jul 2002
    Location
    Ft. Myers, FL
    Posts
    291
    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.
    Work... Some days it's just not worth chewing through the restraints...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •