Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to delete a directory  (Read 11439 times)

0 Members and 1 Guest are viewing this topic.

ŽOŠK

  • Guest
How to delete a directory
« on: April 15, 2007, 02:35:13 PM »
The command "deltree" doesn't work in my Command Prompt. Is there another way to delete a not-empty directory in command prompt?

NiTeCr4Lr

  • Guest
Re: How to delete a directory
« Reply #1 on: April 15, 2007, 02:52:10 PM »
Hmm i'm not sure if it's possible on non-empty directories but why not the RD command ? else clear the dir first ? yea.. thats all i could say srry.

SteveHell

  • Guest
Re: How to delete a directory
« Reply #2 on: April 15, 2007, 03:08:00 PM »
The command "deltree" doesn't work in my Command Prompt. Is there another way to delete a not-empty directory in command prompt?

try  "rmdir"

2k_dummy



    Specialist
  • A word, once spoken, can never be recalled.
  • Thanked: 14
    Re: How to delete a directory
    « Reply #3 on: April 15, 2007, 03:13:53 PM »
    Directories containing files that have H R or S attributes set will not be removed. Use the attrib command to remove all these attributes, then delete the directory.
    If you don't stand for something, you'll fall for anything.
    _______________________________________ ________
    BlackViper

    Software and utilities

    WillyW



      Specialist
    • Thanked: 29
    • Experience: Experienced
    • OS: Windows XP
    Re: How to delete a directory
    « Reply #4 on: April 15, 2007, 04:40:50 PM »
    The command "deltree" doesn't work in my Command Prompt. Is there another way to delete a not-empty directory in command prompt?


    Check out:
    http://www.computerhope.com/rmdirhlp.htm

    Are you operating under XP?
    If so,  be sure to read it all,   including the part about the  /S  switch.

    "Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree."

    .



    jackpkmn

    • Guest
    Re: How to delete a directory
    « Reply #5 on: April 15, 2007, 06:08:47 PM »
    when useing true DOS or windows 95,98,ME reboot to MS-DOS use del *.* this clears out all the files in the current directory but if you say del folder_name it should delete the folder itself (dont use wildercards '*' when deleteing a folder especialy when there are alot of other files that you dont want to delete)

    WillyW



      Specialist
    • Thanked: 29
    • Experience: Experienced
    • OS: Windows XP
    Re: How to delete a directory
    « Reply #6 on: April 16, 2007, 08:34:28 AM »
    when useing true DOS or windows 95,98,ME reboot to MS-DOS use del *.* this clears out all the files in the current directory but if you say del folder_name it should delete the folder itself ...


    This is not correct.

    .



    gpl



      Apprentice
    • Thanked: 27
      Re: How to delete a directory
      « Reply #7 on: April 16, 2007, 11:32:10 AM »
      del foldername
      is equivalent to
      del foldername\*.*

      it does not remove the folder ... use rd foldername -

      RD [/S] [/Q] [drive:]path

          /S      Removes all directories and files in the specified directory
                  in addition to the directory itself.  Used to remove a directory
                  tree.

          /Q      Quiet mode, do not ask if ok to remove a directory tree with /S

      ŽOŠK

      • Guest
      Re: How to delete a directory
      « Reply #8 on: April 18, 2007, 10:51:31 AM »
      Well, I use rmdir like that:
      rmdir c:\Program Files\Directory \S
      But a message appears: "The system cannot find the file specified."

      What's wrong...?

      WillyW



        Specialist
      • Thanked: 29
      • Experience: Experienced
      • OS: Windows XP
      Re: How to delete a directory
      « Reply #9 on: April 18, 2007, 01:34:32 PM »
      Well, I use rmdir like that:
      rmdir c:\Program Files\Directory \S
      But a message appears: "The system cannot find the file specified."

      What's wrong...?

      1.)   Does that directory exist? 

      2.)   Follow the link I gave above.     
             The example in there shows it as    /s     ,   not  \s .

      .



      ŽOŠK

      • Guest
      Re: How to delete a directory
      « Reply #10 on: April 18, 2007, 03:09:11 PM »
      [quote author=WillyW link=topic=34010.msg206296#msg206296
      2.)   Follow the link I gave above.     
             The example in there shows it as    /s     ,   not  \s .
      [/quote]

      OMG... I'm really absent...:D
      Thank you

      WillyW



        Specialist
      • Thanked: 29
      • Experience: Experienced
      • OS: Windows XP
      Re: How to delete a directory
      « Reply #11 on: April 18, 2007, 03:50:17 PM »
      [quote author=WillyW link=topic=34010.msg206296#msg206296
      2.)   Follow the link I gave above.     
             The example in there shows it as    /s     ,   not  \s .

      OMG... I'm really absent...:D
      Thank you
      [/quote]

      Not really -  you can believe that you are not the first to do it.  :)

      But do let us know if you solved it, and if that was it.

      .



      ŽOŠK

      • Guest
      Re: How to delete a directory
      « Reply #12 on: April 19, 2007, 02:17:41 PM »
      Yes! I still don't know why deltree doesn't work but using rmdir I solved the problem.

      WillyW



        Specialist
      • Thanked: 29
      • Experience: Experienced
      • OS: Windows XP
      Re: How to delete a directory
      « Reply #13 on: April 19, 2007, 04:30:45 PM »
      Yes! I still don't know why deltree doesn't work

      You haven't answered the question asked earlier -   are you using XP?

      If so,  you might want to search your system.   I doubt the deltree utility program exists.    I'll take a guess that it only works with FAT file systems.

      Check out:
      http://www.computerhope.com/deltree.htm
      Note what it says about XP.



      Quote
      but using rmdir I solved the problem.

      Great!    Glad you got it.    :)




      .